1

my first post, my apologies if this does not belong here, please refer me to the/a right site. So I am looking for a general form for a primary key given a table containing non-atomic repeated entries in one-or-more fields. Let the fields with repeated entries be F1, F2, F3 . I am guessing that any primary key must contain an ordered triplet in F1, F2 and F3 respectively , maybe also from some other field. Is this correct? I am thinking when I expand the table along F1, F2, F3 to avoid repeated entries, fields other than these three will necessarily repeat.

I am thinking of a table with employee_num, dep_code , emp_lname, emp_dependants, emp_education and emp_training , with the last 3 the only ones containing repetition. I would then expand the table into a larger one to avoid repeated entries. Then each multiple entry of F1 (emp_dependents in this table) would combine with each of the entries of F2, and with each entry of F3 , for a total of |F1|x|F2|x|F3| new entries, where |F1| is the number of repeated entries of F1, etc. , i.e., I need a new row for each dependent, each combined with a new row for each entry in education, etc.

EDIT: I guess I am asking whether there is a general formula for " first normalizing" (finding a PK) for a table with repeated entries.

So, would a triple from F1, F2, F3, the 3 rows with repeated entries give me a primary key for my table? Sorry I don't know how to upload diagrams; I don't even own a scanner. Thanks.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.