|
Answer» Hello Guys,
I am Designing a new database for my project and ran into following problem. I define a functional dependency D as -
D -> E
Here D is PRIMARY Key which uniquely DEFINES E.My problem is D is multi valued attribute and because of this i am unable to represent it into RDBMS model. The only solution i can THINK of now is to represent D as comma separated values. But it violates 1NF . So i want to know is there any other WAY of designing it.What about a Composite Primary Key?
I have heard of them, but never had to use them yet. But here is info on them. http://weblogs.sqlteam.com/jeffs/archive/2007/08/23/composite_primary_keys.aspxIf your multi-valued attribute always has the same number of values, split it up into fields, and make all those fields the primary key.
If it has a variable number of elements, most databases support array types. You can have the primary key be an array field.
|