Download presentation
Presentation is loading. Please wait.
Published byMyrtle Morris Modified over 8 years ago
1
G057 - Lecture 05 From Scenario To Design Mr C Johnston ICT Teacher www.computechedu.co.uk
2
Session Objectives Learn the stages involved in turning a scenario into a “ Logical Data Model ”, Look at an example of the “ scenario to design ” process, Practice the “ scenario to design ” process by completing the exercises.
3
The Process The following steps are taken when faced with a scenario which a database solution would be suitable: Shout Swear Scream Swear some more Cry Read the scenario Identify the nouns Create an entity table Draw an ERD Create a “ Data Dictionary ”
4
Scenario 1 – Read It When a library receives a new book it is given a unique code and the title, author, publisher and ISBN number are recorded. There may be several copies of each work all with their own code in the library along with a shelf reference and current loan state. (A book can be available, damaged, on loan or withdrawn). Each student who uses the library has a student record which shows the student ID, name and address. When a student makes a loan of a book their ID and the unique book code are noted down along with the loan date and return date.
5
Scenario 1 – Identify The Nouns When a library receives a new book it is given a unique code and the title, author, publisher and ISBN number are recorded. There may be several copies of each work all with their own code in the library along with a shelf reference and current loan state. (A book can be available, damaged, on loan or withdrawn). Each student who uses the library has a student record which shows the student ID, name and address. When a student makes a loan of a book their ID and the unique book code are noted down along with the loan date and return date.
6
Scenario 1 – Entity Table Possible EntitiesNotesEntity LibraryProblem area BookYes Unique CodeAttribute of book TitleAttribute of book AuthorAttribute of book PublisherAttribute of book ISBN NumberAttribute of book Copies (Copy)Physical thing on shelfYes WorkPseudonym of book
7
codeAttribute of copy Shelf referenceAttribute of copy Loan stateAttribute of copy StudentYes Student_IDAttribute of student NameAttribute of student AddressAttribute of student LoanYes Student_IDAttribute of loan Unique book codeAttribute of loan Loan DateAttribute of loan Return DateAttribute of loan
8
Scenario 1 - ERD Using the entities found in the scenario it is possible to draw an ERD Sometimes the diagram contain many to many relationships which will need to be resolved.
9
Scenario 1 – Data Dictionary Using the entity table many of the attributes have been found Creating a data dictionary from here should simple Additional attributes may need adding
10
Scenario 2 An insurance company stores data about its customers in a file. When a new customer joins the company they are given a unique ID and details of their name, address and phone number are taken. Over a period of years a customer could have many cars insured, details of which are kept in the policy file. This has details about the car insured (make, model, engine size and registration number) the customer who has the policy, expiry date, price and a unique policy ID. Each time a claim is made on that policy a note is kept. This includes details of the policy number, date of claim and a payout decision.
11
Scenario 3 When a student joins Sidney Stringer 6 th Form, they are assigned a unique ID. Each student has a student file which contains details of their name, address and contact phone number. Students take a number of courses at the school, selecting them from the course register which lists the course code, title, qualification and teacher who runs it. Each teacher can run different courses and their details are kept listing their unique ID, name and subject specialism and pay scale.
12
Exercises 1)Complete the data dictionary for scenario 1 2)Using the process learnt today compile a LDM for scenario 2 and 3. Ensure you include: An identification of nouns An entity table An ERD A Data Dictionary
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.