Search code examples
database-designrelational-databasesql-server-2008-express

Normalized Database Question


I should know this but I expect it to be a simple answer...

This is my simple database so far for this question:

alt text

Am I supposed to insert the Id from Contact and Phone into Contact_Phone when I insert a record into Contact and Phone tables - or can this be done automatically?

I am using SQL Server 2008 Express.


Solution

  • You have to insert it yourself in SQL, but it depends entirely on how you're accessing the database.

    The Entity Framework should be able to handle this for you automatically.