IT Smart's Peoples Help in Creating ER Diagram...

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

I have to create ER diagram for this and I want to get help from IT gurus who knows this material pretty well and can guide me how to do it. Design train service management database for M1 Transport Corporation. Description is given below. • There are several train lines from the city centre to suburbs. Each line has a unique name and is also described by the distance between the city centre and the terminus station. For example the Frankfurt Airport  Line runs from the city centre to  Frankfurt and has a distance of 30 kilometres. • Each station has a unique name, a contact phone number. A station is on at least one train line and some stations are on several train lines. • Standard station facilities include vending machines, newspaper machines, and ticket machines. Each machine has a unique facility number. Some premium stations have such facilities. • Trains are identified by unique train Nos. Other information about trains includes passenger capacity, model, manufacturer and year-made. A train line has several trains and a train is assigned to one line if not under maintenance. • Employees of M1 are described by unique employee Nos, and the first name, last name, and birth date. Drivers are assigned to work on several train lines, and a line has several drivers. • During peak hours (7am—9 week days) premium stations have supervisors to provide customer service. A station has a supervisor and an employee can supervise only one station. Some typical applications for the database include: • A customer wants to go somewhere near a station. S/he wants to find out the train line for his/her trip. • A customer lives close to a train line. But s/he wants to go to a station on a different line. S/he wants to find out if this is possible and if so, at which station to change line? • The M1 management wants a report of contact details of station supervisors and/or drivers for a specific train line. Question: According to the given description, construct an Entity Relationship (ER) diagram for the database, and make assumptions where necessary. Your design shall at least support the given typical applications. You must represent entities, relationships and their attributes, and all applicable constraints in your ER diagram. Explain any concepts in the description that can not be expressed in the ER diagram. Make sure to show one-one, many-many relationships in the diagram via arrows. Convert your ER diagram in the previous question into a relational database schema. For each relation in your relational database schema, you should • underline the primary key and denote any foreign keys with asterisks (*), and • explain the corresponding ER construct to relation mapping rules. For example, this relation X is mapped from the 1:M relationship between Y and Z in the ER diagram and attribute x1 is the primary key because … and x1 is a foreign key referring to the primary key for entity M. Thanks!

good_student · Apr 2, 2013 9:09 PM · 14,305 views

7 Replies

 Haha looks like someone is posting their homework in sajha. I would have done it for you but I choose not to. ER diagram is the basics of understanding DBMS. If you don't understand ER, you will basically do not understand the logical model or the physical model, schema and anything that follows after it. At least if you know how to draw ER diagram, you can generate all other models using power-designer or othe automated software. So, pour in some efforts now and do your homework. Believe me you wil thank me later Just to give you a hint.. Separate the main entities and their attributes  from the requirement and go from there.

junkynfunky · Apr 2, 2013 9:41 PM

nice username!! ^^

alece · Apr 2, 2013 9:45 PM

Thanks!. Actually, that is what I wanted to confirm with the experts.I just want to know how many entities can I make out of it . I can figure out the attributes myself. But figuring out the entities, relations and also one to one and many to many relationships are some difficulties I am facing. Its not that I am not trying and letting others do it. I am just asking for help if I can get any to figure out different entities in this case and how to show the relations between them. Thanks! Last edited: 03-Apr-13 02:32 AM Last edited: 03-Apr-13 02:33 AM

good_student · Apr 3, 2013 2:31 AM

If i remember this still correctly from my college days... I think our professor told us the easy rule - "Noun" are entities and 'verbs' and 'adverbs' are attributes..... May be I m wrong, but this might be true in most cases...

STUPIDA · Apr 3, 2013 9:35 AM

 Stupida is right  The general rule of thumb is nouns are entities and verbs/adverbs are attributes. There may be some exceptions to this rule according to your requirement. After you create boxes with entity as the title and their attributes( right below it),  the relationship and cardinality should be pretty easy. Cardinality is the maximum and minimum constraint you put on the relationship. The main point is to consider the ramifications of those cardinalities.                               Lets say you have a professor entity on left side and the students entity on the right side. So when you do cardinality, you place yourself on the professor box and look towards student, then ask how many students can a professor teach in a class? If the business rule says, there has to be minimum 10 students to offfer a class and max 32 students per class, the cardinality is (10,32).                            Then you place yourself in the student box and look toward professor then ask how many professors teach a class of students. If your answer is 1, then the cardinality is 1. The ramification is when you offer a class, it must have a professor. DBMS does not let you leave the professor field null.                               Lets say there is another entity called course. A student may be enrolled in one or more classes. Look at the verb may be. This means a student can take zero or more courses. It you put the (1,n) as the cardinality here, it means each student must have taken a class which creates some problem later. So the cardinality should be (0,n).                            Hope this clears it for you.

junkynfunky · Apr 3, 2013 11:40 AM

Small hint: Entities can be Train, Employee, Station, Line(lineId, linename, trainstartlocation, endlocation, distance, trainid).

Munabhai · Apr 3, 2013 1:51 PM

Thank you so much for taking time to explain things...If you can help me telling all the entities and how to connect between them in this particular example..it will be helpful... Thanks!

good_student · Apr 4, 2013 6:41 AM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all