Help in ER Diagram and Schema Tables..

mayjune's Avatar, Join Date: Jun 2009
Invasive contributor
Hi,
I have to make a vb+sql project. I am making it on IMDB (Internet Movie Database - check wiki for more info) Its basically a site which manages a huge database for movies, its reviews, ratings etc.

I am so confused in it. I made an ER diagram, with whatever info i got, but i have so many confusions.

1) Do you underline the foreign key?
2) Do you show foreign key ?
3) In the diagram, I have subbed Actors address as a seperate entity, do i have to show actors id in it as a foreign key?
4) A Member crticizes a movie, but i didnt know how to show that in the diagram?
5) Are the relations shown correct? if not whats wrong?
6) How do I make a schema table out of it?
7) Do i show foreign key in all of them?
8) How do I show criticism in the schema table? as it itself is not a table but a relation!

I am so confused...i have to show something so i made something, im attaching both ER and Schema, have a look at it and give your feedbacks. Thanks a ton
Attached Images
File Type: jpg ER Model.jpg (190.8 KB, 220 views)
File Type: jpg schema.jpg (114.6 KB, 117 views)
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by mayjune View Post
1) Do you underline the foreign key?
No only primary keys

Quote:
Originally Posted by mayjune View Post
2) Do you show foreign key ?
No

Quote:
Originally Posted by mayjune View Post
3) In the diagram, I have subbed Actors address as a seperate entity, do i have to show actors id in it as a foreign key?
Yes

Quote:
Originally Posted by mayjune View Post
4) A Member crticizes a movie, but i didnt know how to show that in the diagram?
As a Review with may be a rating.

Quote:
Originally Posted by mayjune View Post
5) Are the relations shown correct? if not whats wrong?
No. You have movie and Actor but there may be many actors in a movie.

Quote:
Originally Posted by mayjune View Post
6) How do I make a schema table out of it?
If you have the ER Diagram correct each unit would be a table.

Quote:
Originally Posted by mayjune View Post
7) Do i show foreign key in all of them?
No

Quote:
Originally Posted by mayjune View Post
8) How do I show criticism in the schema table? as it itself is not a table but a relation!
Relations would also be a table.

I would suggest you start ER Diagram on smaller note.
mayjune like this
mayjune's Avatar, Join Date: Jun 2009
Invasive contributor
Ok, i have made a new ER and Schema diagram, please see and tell me if its correct.
Although this project has been rejected on the basis that its for web application...
although it makes no sense as to whats the problem if it is???
Anyway, i still made it to understand and learn how to make them...

Also...What confuses me is there can be many ways to represent the same project...so how do i know which one teacher would think is correct? as its very subjective....in theory paper i have to make them....

Please see and tell me the relations are correct or not, as i spent whole day in understanding them..thanks..
Attached Images
File Type: jpg ER.jpg (107.9 KB, 118 views)
File Type: jpg schema.jpg (66.9 KB, 101 views)
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
In the ER Diagram Primary Key should be underlined.
I do not understand the reason for Member Table. It should be combined into Account.
Criticism Table should not have Movie Name