Download presentation
Presentation is loading. Please wait.
Published byTrevor Russell Modified over 6 years ago
1
IS6145 Database Analysis and Design Examples for exam revision
Rob Gleasure
2
Disclaimer Please note two important points regarding the solutions presented below Solutions are not the only possible correct option – there are always multiple correct answers. Solutions should not be viewed until you’ve attempted an answer yourself. Otherwise, you won’t learn how to do it yourself.
3
Chen’s ERD from Winter 2016 Draw an Enhanced Fine Granular Design-Specific Entity-Relationship Diagram using Chen’s notation based on the following narrative: A bus company wishes to redesign their data store. At the moment, data are stored for buses according to their registration and the number of seats. Each bus may serve a number of individual routes, each of which is identified by a particular code. Routes will also describe their start and end locations, each individual stop, and the range of individual buses that serve each one. For routines that run during the day, data are also stored regarding their sensitivity to traffic (some will serve routes that slow considerably during rush hour) and whether multiple routes are ever run simultaneously to satisfy demand. For routes that run during the night, data will specify whether they run all week long or only at nights. Night routes may also be allocated a security guard, data for whom includes their name, their gender, and any training courses they may have undertaken. Buses are stored in specific depots, for which the name, address, and contact numbers must be stored. Data are also stored for bus drivers, data for whom will include a name, a date of birth, a job title, and a unique employee ID. These drivers will be allocated a number of specific routes, or alternatively a specific bus.
4
Example solution
5
SSADM ERD Example Draw an SSADM ERD for the following narrative:
A train service stores data for drivers that includes their name, address, salary, and union. Some drivers mentor other drivers. Each driver is allocated a specific train (though a train may be allocated more than one drivers), for which the model and manufacturer is stored, as well as live data indicating the amount of fuel. In addition to a driver, a train must be allocated a ticket inspector, though these inspectors can serve any number of trains. Data for ticket inspectors notes their name, home location, and possible other notes of relevance. Each train is linked to some region, which has a name and possible other notes of relevance. Regions contain many trains and some regions are sponsored by third-party companies. Sponsors are recognisable by name and also note the contract duration.
6
Example solution
7
Normalisation (Winter 2016)
Table 1. Database for train bookings Name Ticket type Amendable Journey Duration Departure Nationality EU Ben Feringa Monthly pass Yes Paris to Munich 4 hours 15/01/ Berlin to Vienna 2.5 hours 25/01/ Netherlands May-Britt Moser One-way No Barcelona to Madrid 3 hours 03/02/ Norway Alice Munro Return 20/01/ Munich to Paris 12/03/ Canada Yoshinori Ohsumi Milan to Bucharest 5 hours Bucharest to Krakow 9 hours 20/02/ Japan
8
Normalisation (Winter 2016)
1st normal form FName LName Ticket type Amendable Journey Duration Departure National-ity EU Ben Feringa Monthly pass Yes Paris to Munich 4 hours 15/01/ Nether-lands Berlin to Vienna 2.5 hours 25/01/ May-Britt Moser One-way No Barcelona to Madrid 3 hours 03/02/ Norway Alice Munro Return 20/01/ Canada Munich to Paris 12/03/ Yoshinori Ohsumi Milan to Bucharest 5 hours Japan Bucharest to Krakow 9 hours 20/02/
9
Normalisation (Winter 2016)
2nd normal form Passenger ID Ticket type Journey Departure 1 Monthly pass Paris to Munich 15/01/ Berlin to Vienna 25/01/ 2 One-way Barcelona to Madrid 03/02/ 3 Return 20/01/ Munich to Paris 12/03/ 4 Milan to Bucharest Bucharest to Krakow 20/02/ Passenger ID First name Last name Nationality EU 1 Ben Feringa Netherlands Yes 2 May-Britt Moser Norway No 3 Alice Munro Canada 4 Yoshinori Ohsumi Japan Ticket type Amendable Monthly pass Yes One-way No Return Paris to Munich 4 hours Berlin to Vienna 2.5 hours Barcelona to Madrid 3 hours Munich to Paris Milan to Bucharest 5 hours Bucharest to Krakow 9 hours
10
Normalisation (Winter 2016)
3rd normal form Passenger ID Ticket type Journey Departure 1 Monthly pass Paris to Munich 15/01/ Berlin to Vienna 25/01/ 2 One-way Barcelona to Madrid 03/02/ 3 Return 20/01/ Munich to Paris 12/03/ 4 Milan to Bucharest Bucharest to Krakow 20/02/ Passenger ID First name Last name Nationality 1 Ben Feringa Netherlands 2 May-Britt Moser Norway 3 Alice Munro Canada 4 Yoshinori Ohsumi Japan Nationality EU Netherlands Yes Norway No Canada Japan Ticket type Amendable Monthly pass Yes One-way No Return Paris to Munich 4 hours Berlin to Vienna 2.5 hours Barcelona to Madrid 3 hours Munich to Paris Milan to Bucharest 5 hours Bucharest to Krakow 9 hours
11
Image from https://www. askideas
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.