duplicate values for primary keys
Posted by: Chris Bassett
Date: June 29, 2010 11:49PM

I know this may violate one of the Normalization rules, but is what I"m going to propose an appropriate violation:

I want to craete a "look up" table of common file extensions and be able to list what they are and what program to use to view/open the particular file in question.

I have a DB setup as follows (there is a table called: FileTypes). In this table there are two columns: type_id (which is a tinytext value that stores the file's extension, such as "txt" or "html" or whatever). Then there is another column named 'type_desc' which is of the text data type, and holds a brief description of what type of file it is.

Now here's my problem, some file types have multiple "meanings" such as the "BAS" extension (which is commonly used for the BASIC/Visual Basic programming language). Assuming that "type_id" is a primary key, is it wrong to have multiple entries whose type_id are "bas" (I would think I'd need two of them). I know this violates the normalization process, but would this be an acceptable violation where there can be multiple meanings?

(Another example (to illustrate my question) might be an online dictionary, where one term may have many meanings.)

Suggestions on how to model this type of table with minimal Normalization rule violations.

Options: ReplyQuote

Written By
duplicate values for primary keys
June 29, 2010 11:49PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.