Database design w/Entity Framework 4 - where should I put my foreign keys?

EF is correct, because your model allows multiple Reviews to share the same Content, and multiple Games to share the same Review.

EF is correct, because your model allows multiple Reviews to share the same Content, and multiple Games to share the same Review. At the same time, your model is logical so I wouldn't worry about what EF thinks. You should be able to delete the 'Navigation Properties' that you don't need if you want - i.e.

Delete the Reviews property on the Content entity (in the designer). This won't give you any benefit but may make things simpler for you. If you are certain that every Review should have its own Content and so forth, you should make ContentID unique in the Review table.It is not incorrect to make ContentID the primary key of the Review table, either - in this way the Review becomes an extension of Content.

However you need to consider if this meets your needs.

I would rename it to something more descriptive. It's a good database design, but more flexible than your needs. The one change I would make is to make the GameId not be an identity, rather rename it to ContentId and make it a FK onto the Content table, that way you can search for games/not-games at the same time.

After that I would remove the ReviewId column from the Games table (not necessary since you can join by Reviews. ContentId field). Your design does allow for multiple reviews per content piece... I would imagine you will want this flexibility: If you don't have multiple reviewers now, you may have it in the future.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions