-
How to Normalize A Table Which Has A Foreign Key
I'm trying to normalize a table and I have some difficulties. In my table, I have 3 attributes which are
User(Username, Password, Employee_ID)
Now I'm trying to normalize this table. First as far as I know I need to determine the Functional Dependencies
Username->Password,Employee_ID
Employee_ID-> Username,Password
So there are 2 candidate keys yet something does not fit. So here is my first question comes
If we have a primary key in a table, shouldn't we directly say that that table is in the second form since a single attribute is a candidate key? Also if we have a primary key and a foreign key in a table, how do we normalize this table?
I thought creating another table as a composite entity which includes Username and Employee_ID, would be logical but I'm not sure whether it is the solution or not.
Edit: Also additionaly I need to determine the functional dependency yet here the only ones that I could find are the ones that I wrote above. So from here if this table is not in the second form also I need to demonstrate the partial dependency yet I cannot find that too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|