Search code examples
mysqlms-accessdatabase-designdatabase-normalization

Databases 2nd normal form and foreign keys


I am currently working on a database structure in Microsoft Access 2010 and I have come across following question:

I have a table called tblPC and another table called tblOperators: tblOperators has following attributes: idOperator (Primary key, autoincrement number), idStaff_number(personnel number) and txtOperator_name.

tblPC has following attributes: idPC(Primary key, autoincrement number), txtModelNumber, numPC_serial_number, idOperator(number)

Now I want to connect those two tables: one Operator can operate on one or more PCs, but an PC has only one Operator, which means, that there would be a 1:n-Relation between tblOperators and tblPC.

My question: Is the idOperator Attribut in the PC table correct? I am afraid that it wouldnt match the second normal form because the idOperator has nothing to do with the Primary key?

Thanks in advance!!


Solution

  • If you don't have composite keys then if you're in 1NF you're automagically in 2NF.