All Database Design Tuts V1.3

973 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
973
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

All Database Design Tuts V1.3

  1. 1. Database Design Tutorial 1 1. Using the following databases write the database schema and Network diagrams. a. Shop database PartDetails partName colour Cost suppierId SuplierDetails suppierId address phone b. Flower database DeliverlyInfo DeliveryId category size FlowerInfo Id Name LatinName HighZoneId LowZoneId DeliveryId Light Soil ZoneInfo ZoneId LowestTemp highestTemp c. PurchaseProd Customer cNo title sName initials street city postc credLim balance Invoice invoNo cNo invDate amount Payment invoNo paytNo pmtDate amount Version 1.1 1 of 9
  2. 2. Database Design Tutorial 2 Tutorial 2: Functional Dependency Diagrams: Complete the following: 1. For each of the tables of data below, draw a functional dependency diagram. Table 1 Table 2 Table 3 2. For each of the following tables, draw a functional dependency diagram. Table 1 Table 2 a. Assume a tute group meets only once a week. b. How would the diagram be different if this were not the case? Version 1.1 2 of 9
  3. 3. Table 3 3. For the following business rules, pick out the data elements and draw functional dependency diagrams. a. Orders (identified by order_id) are made for parts (identified by part_no). Any quantity of parts can be ordered in an order. b. The grades received by students (identified by student_id) in units in different semesters. c. The price of cars (identified by registration number) in car yards owned by a dealer. d. The outstanding loans which are due by a borrower (identified by borrower_id) on a particular due date of books (identified by accession number). e. The date, time and amount of withdrawals and deposits on accounts (identified by account_no). f. The total distance travelled in kilometers by cars (identified by registration number) used by drivers (identified by employee#) on a day (identified by date). Assume a car can be driven by more than one driver in a day. g. A person (identified by employee#) can work on more than one project (identified by project_id). A person starts on a project on a single start date. More than one person can start on the same project on the same date but a person can start only once on the same project and cannot start on more than one project on the same date. h. Deliveries (identified by delivery number) include many parts (identified by part number). There is quantity delivered of each part, and each part has one weight (measured in kilograms). Parts come in many colours. The quantity on hand is maintained for each colour of each part. i. Subjects (identified by subject name) use a number of texts (identified by title). Each text can have a number of authors (identified by author name). Each subject can be taught a number of semesters and there is one teacher (identified by teacher name) for each subject each semester. 4. Consider a simple personnel application where an employee is uniquely identified by an employee number. Each employee has a name and a salary. Suppose different employees can have the same name or salary. Draw a functional dependency diagram for the application. Suppose further that each employee worked in a department and that all employees in the same department received the same salary. Modify your FDD accordingly. Eliminate redundant FDs. Version 1.1 3 of 9
  4. 4. Database Design Tutorial 3 1. Which of the following are likely to be reasonable entity types in a typical business system. For those that you do not think are reasonable entity types, indicate why they do not qualify. a. Customer b. Computer sales tax c. Height d. Product e. Tomato f. Religion g. Temperature h. Edit transaction i. Manufactured part j. Map k. ASCII character 2. Which of the following are likely to be relationships in an ERD and which are not? Why or why not? a. Purchases b. Customer c. Belongs to d. Weight e. Produces f. Sales tax computation 3. For each of the following, suggest a way to identifying an instance. Which ones are therefore likely to be strong or weak entities? a. Person b. street corner c. appointment d. film e. real estate purchase f. stock holding g. car h. personal computer i. super market purchase j. journey k. road sign l. book 4. Draw an ER Diagram to represent the following situation for an airline: “XYZ airline has three major resources aeroplanes, pilots, and crew members. Pilots and crew members have respective home bases, to which they return at the end of an assigned flight. A flight on a particular day must have an aeroplane, at least one pilot and one or more crew members attached to it. Each aeroplane has a maintenance base.” Version 1.1 4 of 9
  5. 5. Database Design Tutorial 3 5. Draw an ER Diagram to describe the following situation for a publisher: “ABC Press works with several different authors who write the books it publishes. Some authors have written only one book, while others have written many; also, some books are co-authored by multiple authors. ABC also works with multiple printers; each book, though, is printed by only one printer. An editor as ABC Press works with several authors at a time, editing and producing their book projects; it is the editors job to turn over the final camera-ready copy to the printer when the manuscript has been copyedited and typeset.” 6. Study the following narrative and draw ER Diagrams with cardinality constraints. Ensure that every entity identifiable. a. Orders(identified by order_id) are made for parts (identified by part_no). any quantity of parts can be ordered in an order. b. Students (identified by student_id) are graded in units( with a unit-code) in different semesters. c. Each car (identified by registration number) is on sale at a particular car yard ( at an address) for a price. Each car yard is owned be a dealer. d. Each book (identified by barcode number) barrowed by a member (identified by borrower_id) is due on a particular date. e. The date and amounts of all withdrawals and deposits on accounts (identified by account_no) f. The distance travelled in kilometres by cars (identified by registration number) by particular drivers (identified by driver_id) on various dates. g. A person starts on a project on a given start date. More than one person can start on the same project on the same date but a person can start only once on the same project and cannot start on more than one project on the same date. A person can work on more than one project. h. A delivery (identified by delivery number) may supply many parts (identified by part number). Each part has one weight (measured in kilograms) and may come in different colours. For each part of a certain colour, the quantity delivered is picked from the quantity on hand. i. Subjects (identified by subject name) use a number of texts. Each text has a unique name and can have a number of authors. An author is identified by their name. Each subject can be taught a number of semesters and there is one teacher for each subject each semester. j. Suppose in case I) different teachers recommend different texts for the same subject, but not in different semester. Version 1.1 5 of 9
  6. 6. More on FDD 2. Shoes are sold in a variety of styles and sizes. A style is identified by a style number. Each style has a description, but the same description may apply to several styles. Weekly-Sales represents the number of shoes of a particular size and style sold in the previous week. Monthly-style-value is the total sales value in the previous month for each style. Draw an FDD for the data elements Style-Number, Description, Size, Weekly-Sales, Monthly-Style-Value. How would your diagram change if you incorporated Week and Month, so historical data of Weekly-Sales and Monthly-Style-Value could be maintained? 3. Refer to the forms below. Draw FDDs & network diagrams for forms: a. CUSTOMER ORDER b. THE SOFTWARE SOFTIES Version 1.1 6 of 9
  7. 7. Version 1.1 7 of 9
  8. 8. c. FASHION DISTRIBUTORS d. BILBO & BAGGINS Version 1.1 8 of 9
  9. 9. e. THE HOUSE OF MUSIC Version 1.1 9 of 9

×