I am designing a database for a class and I was wondering a couple things.
I have come up with 7 entities and basically my tables correspond one entity. After drawing an E-R diagram it I didn't find that I needed any extra tables. Is this bad that I came up with the same amount of tables as I did entities?
Also I had a further indepth question. How would you handle creating a table in which one of it's columns needs to refer to two similar but different tables. I'll give an example. So if I had a table for trucks and a table for cars and I wanted a race table which would have a car or truck along with information regarding a race record as in date of race, name of race, etc... so essentially it would look like.
alright. This leads to a couple other questions. How would you implement that into a select statement if they have the same primary key?
For my project though I'm making a database for review website. the thing is, is I might scrap it because I have the same amount of entities as tables.
because all the relationships are very simple and about the same such as a review to reviewer is made review. The only many to many relationship I have is that one platform such as xbox360 can have many games and one game can be on many platforms, but I don't see it to be necessary to make another table for that. But overall my design would work for a functional database though it has the same amount of tables as entities.
Now in all cases is having the same amount of tables as entities bad? if so i need to change this.
Last edited by CrimsonK; 12-05-10 at 13:03.
Reason: added question