Jerry Post Copyright © 2007 1 Database Management Systems Chapter 3 Data Normalization.

Slides:



Advertisements
Similar presentations
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Advertisements

Jerry Post Copyright © 2013 DATABASE Database Management Systems Chapter 3 Data Normalization 1.
Tutorial 6: normalize the following relation to 1NF, 2NF, and 3NF TransIDRentDateCustomerIDLastNamePhoneAddressVideoIDCopy#TitleRent 14/18/043Washington
Data Modeling and Relational Database Design ISYS 650.
Systems Development Life Cycle
© 2005 by Prentice Hall 1 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B.
Jerry Post McGraw-Hill/Irwin Copyright © 2005 by The McGraw-Hill Companies, Inc. All rights reserved. Database Management Systems Chapter 2 Database Design.
Database Design Conceptual –identify important entities and relationships –determine attribute domains and candidate keys –draw the E-R diagram Logical.
Database Management Systems
Chapter 2 Database System Design (part II)
The Relational Database Model:
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Design Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
Chapter 5 Normalization of Database Tables
1 Chapter 2 Reviewing Tables and Queries. 2 Chapter Objectives Identify the steps required to develop an Access application Specify the characteristics.
Why Normalization? To Reduce Redundancy to 1.avoid modification, insertion, deletion anomolies 2.save space Goal: One Fact in One Place.
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
1 Copyright © 2010 Jerry Post. All rights reserved. Data Normalization (2) IS 240 – Database Lecture #5 – M. E. Kabay, PhD, CISSP-ISSMP Assoc.
Chapter 6 Physical Database Design. Introduction The purpose of physical database design is to translate the logical description of data into the technical.
1 Copyright © 2010 Jerry Post. All rights reserved. Database System Design IS240 – DBMS Lecture #3 – M. E. Kabay, PhD, CISSP-ISSMP Assoc. Prof.
Jerry Post Copyright © Database Management Systems Chapter 3 Data Normalization.
1 Copyright © 2010 Jerry Post. All rights reserved. Data Normalization (1) IS240 – DBMS Lecture # 4 – M. E. Kabay, PhD, CISSP-ISSMP Assoc. Prof.
DATABASE DESIGN LECTURE FOUR. Why Design a Database? Goal:  To produce an information system that adds value for the user  Reduce costs  Increase sales/revenue.
MIS 327 Database Management system 1 MIS 327: DBMS Dr. Monther Tarawneh Dr. Monther Tarawneh Week 6: Database Design: Example Rolling Thunder.
DAY 15: ACCESS CHAPTER 2 Larry Reaves October 7,
Chapter 4 Querying Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba Asper School of Business 3500 DBMS Bob Travica.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Database Design Sections 6 & 7 Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies and Recursive relationships.
Concepts and Terminology Introduction to Database.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Database Development and Data Normalization. 2 What is a Database and a DBMS?  Database  A collection of data stored in a standardized format, designed.
Fundamentals, Design, and Implementation, 9/e. Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 4/2 Copyright.
University of Manitoba Asper School of Business 3500 DBMS Bob Travica
Database Systems: Design, Implementation, and Management Tenth Edition
Concepts of Relational Databases. Fundamental Concepts Relational data model – A data model representing data in the form of tables Relations – A 2-dimensional.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 5 Normalization of Database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, Modified by Dr. Mathis 3-1 David M. Kroenke’s Chapter Three: The Relational.
DBSYSTEMS Chapter 3 Data Normalization Get data properly tabled! Based on G. Post, DBMS: Designing & Building Business Applications University of Manitoba.
1 All Powder Board and Ski SQL Server Workbook Chapter 2: Database Design Jerry Post Copyright © 2004.
Copyright 2008 McGraw-Hill Ryerson 1 TECHNOLOGY PLUG-IN T5 DESIGNING DATABASE APPLICATIONS.
1.NET Web Forms Business Forms © 2002 by Jerry Post.
Entity-Relationship (ER) Modelling ER modelling - Identify entities - Identify relationships - Construct ER diagram - Collect attributes for entities &
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
1 Functional Dependencies and Normalization Chapter 15.
All Powder Board and Ski Microsoft Access Workbook Chapter 2: Database Design Jerry Post Copyright © 2003.
1 Copyright © 2010 Jerry Post & M. E. Kabay. All rights reserved. Queries: Part 2 of 2 IS240 – DBMS Lecture # 7 – M. E. Kabay, PhD, CISSP-ISSMP.
School of Computer & Communication of LNPU 辽宁石油化工大学计算机与通信工程学院 刘旸 1 Chapter 2 Database Design 第二章 数据库设计 数据库管理系统 Database Management Systems.
Programming Logic and Design Fourth Edition, Comprehensive Chapter 16 Using Relational Databases.
CS263 Lecture 5: Logical Database Design Can express the structure of a relation by a Tuple, a shorthand notation Name of the relation is followed (in.
All Powder Board and Ski Oracle 9i Workbook Chapter 3: Database Tables Jerry Post Copyright © 2003.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Logical Database Design and the Relational Model.
Database Planning Database Design Normalization.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Jerry Post Copyright © Database Management Systems Chapter 2 Database Design.
1 Database Design Sections 6 & 7 First Normal Form (1NF), Second Normal Form (2NF), Unique Identifiers (UID), Third Normal Form (3NF), Arcs, Hierarchies.
1 CS490 Database Management Systems. 2 CS490 Database Normalization.
1 Data Normalization Text book Chapter 3: Jerry Post Copyright © 2003.
Database Management Systems
Database Management Systems
Data Normalization (1) IS240 – DBMS Lecture # 4 –
Microsoft Office Access 2010 Lab 1
Databases Chapter 9 Asfia Rahman.
M. E. Kabay, PhD, CISSP-ISSMP V:
Normalization Karolina muszyńska
Data Normalization (2) IS 240 – Database Lecture #5 –
Database System Design
Database Management Systems
Presentation transcript:

Jerry Post Copyright © Database Management Systems Chapter 3 Data Normalization

DATABASE 2 Objectives  Why is database design important?  What is a table and how do you choose keys?  What are the fundamental rules of database normalization?  How do you begin analyzing a form to create normalized tables?  How do you create a design in first normal form?  What is second normal form?  What is third normal form?  What problems exist beyond third normal form?  How do business rules change the database design?  What problems arise when converting a class diagram to normalized tables?  What tables are needed for the Sally’s Pet Store?  How do you combine tables from multiple forms and many developers?  How do you record the details for all of the columns and tables?

DATABASE 3 Why Normalization?  Need standardized data definition  Advantages of DBMS require careful design  Define data correctly and the rest is much easier  It especially makes it easier to expand database later  Method applies to most models and most DBMS  Similar to Entity-Relationship  Similar to Objects (without inheritance and methods)  Goal: Define tables carefully  Save space  Minimize redundancy  Protect data

DATABASE 4 Definitions  Relational database: A collection of tables.  Table: A collection of columns (attributes) describing an entity.  Individual objects are stored as rows of data in the table.  Property (attribute): a characteristic or descriptor of a class or entity.  Every table has a primary key.  The smallest set of columns that uniquely identifies any row  Primary keys can span more than one column (concatenated keys)  We often create a primary key to insure uniqueness (e.g., CustomerID, Product#,...) called a surrogate key (see slide #8). EmployeeIDTaxpayerIDLastNameFirstNameHomePhoneAddress CartomAbdul(603) South Street VenetiaanRoland(804) Paramaribo Lane JohnsonJohn(703) Main Street StenheimSusan(410) W. Maple Employee Properties Rows/Objects Class: Employee Primary key

DATABASE 5 Keys  Primary key  Every table (object) must have a primary key  Uniquely identifies a row (one-to-one)  Concatenated (or composite) key  Multiple columns needed for primary key  Identify repeating relationships (1 : M or M : N)  Key columns are underlined  First step  Collect user documents  Identify possible keys: unique or repeating relationships

DATABASE 6 Notation Table name Primary key is underlined Table columns Customer(CustomerID, Phone, Name, Address, City, State, ZipCode) CustomerIDPhoneLastNameFirstNameAddressCityStateZipcode JohnsonMartha125 Main StreetAlvatonKY SmithJack873 Elm StreetBowling GreenKY WashingtonElroy95 Easy StreetSmith’s GroveKY AdamsSamuel746 Brown DriveAlvatonKY RabitzVictor645 White AvenueBowling GreenKY SteinmetzSusan15 Speedway DrivePortlandTN LasaterLes67 S. Ray DrivePortlandTN JonesCharlie867 Lakeside DriveCastalian SpringsTN ChavezJuan673 Industry Blvd.CaneyvilleKY RojoMaria88 Main StreetCave CityKY42127

DATABASE 7 Identifying Key Columns Orders OrderItems OrderIDDateCustomer OrderIDItemQuantity Each order has only one customer. So Customer is not part of the key. Each order has many items. Each item can appear on many orders. So OrderID and Item are both part of the key.

DATABASE 8 Surrogate Keys  Real world keys sometimes cause problems in a database.  Example: Customer  Avoid phone numbers: people may not notify you when numbers change.  Avoid SSN (privacy and most businesses are not authorized to ask for verification, so you could end up with duplicate values)  Often best to let the DBMS generate unique values  Access: AutoNumber  SQL Server: Identity  Oracle: Sequences (but require additional programming)  Drawback: Numbers are not related to any business data, so the application needs to hide them and provide other look up mechanisms.

DATABASE 9 Common Order System Customer Order Salesperson Item OrderItem 1 * 1 * 1 1 * * Customer(CustomerID, Name, Address, City, Phone) Salesperson(EmployeeID, Name, Commission, DateHired) Order(OrderID, OrderDate, CustomerID, EmployeeID) OrderItem(OrderID, ItemID, Quantity) Item(ItemID, Description, ListPrice)

DATABASE 10 Database Normalization Rules  1.Each cell in a table contains atomic (single-valued) data.  2.Each non-key column depends on all of the primary key columns (not just some of the columns).  3.Each non-key column depends on nothing outside of the key columns.

DATABASE 11 Atomic Values for Phone Numbers CustomerIDLastNameFirstNamePhoneFaxCellPhone 15023JonesMary SanchezMiguel O’ReillyMadelline SteinMarta BriseMer

DATABASE 12 Repeating Values for Phone Numbers CustomerIDLastNameFirstNamePhone 15023JonesMary SanchezMiguel O’ReillyMadeline SteinMarta BriseMer

DATABASE 13 Repeating Values for Phone Numbers CustomerIDLastNameFirstName 15023JonesMary 63478SanchezMiguel 94552O’ReillyMadeline 45791SteinMarta 49004BriseMer CustomerIDPhoneTypePhone 15023Land Fax Cell Land Fax Land Fax Cell Laptop Land Land

DATABASE 14 Simple Form Customer IDCompany Name City Contact LastName, FirstName Phone

DATABASE 15 Initial Design Customer(CustomerID, CompanyName, City) Contact(ContactID, CustomerID, LastName, FirstName)

DATABASE 16 Client Billing Example Client Billing Client(ClientID, Name, Address, BusinessType) Partner(PartnerID, Name, Speciality, Office, Phone) PartnerAssignment(PartnerID, ClientID, DateAcquired) Billing(ClientID, PartnerID, Date/Time, Item, Description, Hours, AmountBilled) Each partner can be assigned many clients. Each client can be assigned to many partners.

DATABASE 17 Client Billing--Different Rules Client(ClientID, Name, Address, BusinessType) Partner(PartnerID, Name, Speciality, Office, Phone) X PartnerAssignment(PartnerID, ClientID, DateAcquired) Billing(ClientID, PartnerID, Date/Time, Item, Description, Hours, AmountBilled) combine If each client is assigned to only one partner. then PartnerID needs not be a primary key. Combine Client and PartnerAssignment tables as below, since they have the same key. Client(ClientID, Name, Address, BusinessType, PartnerID, DataAcquired)

DATABASE 18 Client Billing--New Assumptions ClientIDPartnerIDDate/TimeItemDescriptionHoursAmountBilled :03967Stress analysis2$ :15754New Design3$ :30967Stress analysis2.5$650 Billing More realistic assumptions for a large firm. Each Partner may work with many clients. Each client may work with many partners. Each partner and client may work together many times. The identifying feature is the date/time of the service. What happens if you do not include Date/Time as a key?

DATABASE 19 Sample Database for Sales Sale IDDate Customer First Name Last Name Address City, State ZIPCode ItemIDDescriptionList PriceQuantityQOHValue Total A sample check out screen QOH: Quantity On Hand

DATABASE 20 Initial Objects Initial ObjectPrimary KeySample Properties CustomerCustomerIDName Address Phone ItemItemIDDescription List Price Quantity On Hand SaleSaleIDSale Date SaleItemsSaleID + ItemIDQuantity

DATABASE 21 Initial Form Evaluation Sale ID Date Customer First Name Last Name Address City, State ZIPCode ItemIDDescriptionList Price QuantityQOHValue Total SaleForm(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode, (ItemID, Description, ListPrice, Quantity, QuantityOnHand) ) Identify potential keys. Identify repeating groups.

DATABASE 22 Problems with Repeating Sections SaleForm(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode, (ItemID, Description, ListPrice, Quantity, QuantityOnHand) ) SaleIDDateCIDFirstNameLastNameAddressCityStateZIPItemIDDescriptionListPriceQuantityQOH / MaryJones111 ElmChicagoIL Air Tank Regulator Mask / MiguelSanchez222 OroMadrid15 33 Air Tank Mask / MaryJones111 ElmChicagoIL Snorkel 71 Wet suit-S / MadelineO’Reilly333 TamDublin Wet suit-S Mask 1557 Snorkel Repeating section Not atomicDuplication

DATABASE 23 First Normal Form SaleForm(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode, (ItemID, Description, ListPrice, Quantity, QuantityOnHand) ) SaleForm2(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode) SaleLine(SaleID, ItemID, Description, ListPrice, Quantity, QuantityOnHand) Split SaleForm into SaleForm2 and SaleLine

DATABASE 24 Current Design

DATABASE 25 Multiple Repeating: Independent Groups FormA(Key1, Simple Columns, (Group1, A, B, C), (Group2, X, Y) ) MainTable(Key1, Simple Columns) Group1(Key1, Group1, A, B, C)Group2(Key1, Group2, X, Y)

DATABASE 26 Nested Repeating Sections  Nested: Table (Key1, aaa... (Key2, bbb... (Key3, ccc...) ) )  First Normal Form (1NF)  Table1(Key1, aaa...)  Table2(Key1, Key2, bbb..)  Table3(Key1, Key2, Key3, ccc...) Table (Key1,... (Key2,... (Key3,...) ) ) Table1(Key1,...)TableA (Key1,Key2...(Key3,...) ) Table2 (Key1, Key2...)Table3 (Key1, Key2, Key3,...)

DATABASE 27 First Normal Form Problems (Data) SaleLine(SaleID, ItemID, Description, ListPrice, Quantity, QuantityOnHand) SaleIDItemIDDescriptionListPriceQuantityQOH Air Tank Regulator Mask Air Tank Mask Snorkel West suit-S Wet suit-S Mask Snorkel Duplication for columns that depend only on ItemID not on both SaleID & ItemID (the primary key). Every time an item is sold, the clerk has to reenter its description, list price, and quantity on hand. Also, if an item has not yet been sold, what is its ListPrice? (no item information yet)

DATABASE 28 Second Normal Form Definition  Each non-key column must depend on the primary key.  Only applies to concatenated keys  Some columns only depend on part of the key  Split those into a new table.  Dependence (definition)  If given a value for the key you always know the value of the property in question, then that property is said to depend on the key.  If you change part of a key, and the questionable property does not change, then the table is not in 2NF. (not depends on the primary keys) SaleLine(SaleID, ItemID, Description, ListPrice, Quantity, QuantityOnHand) Depends on both SaleID and ItemID Depend only on ItemID

DATABASE 29 Second Normal Form Example SaleLine(SaleID, ItemID, Description, ListPrice, Quantity, QuantityOnHand) SaleItems(SaleID, ItemID, Quantity) Item(ItemID, Description, ListPrice, QuantityOnHand) Split SaleLine into SaleItems and Item

DATABASE 30 Second Normal Form Example (Data) SaleIDItemIDQuantity ItemIDDescriptionListPriceQOH 15Air Tank Regulator Mask Mask Snorkel Snorkel Wet suit-S Wet suit-M SaleItems(SaleID, ItemID, Quantity) Item(ItemID, Description, ListPrice, QuantityOnHand)

DATABASE 31 Second Normal Form in DB Design

DATABASE 32 Second Normal Form Problems (Data) SaleIDDateCustomerIDFirstNameLastNameAddressCityStateZIP / MaryJones111 ElmChicagoIL / MiguelSanchez222 OroMadrid / MaryJones111 ElmChicagoIL / MadelineO’Reilly333 TamDublin SaleForm2(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode) Duplication

DATABASE 33 Third Normal Form Definition SaleForm2(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode) Depend on SaleID Depend on CustomerID

DATABASE 34 Third Normal Form Example SaleForm2(SaleID, SaleDate, CustomerID, FirstName, LastName, Address, City, State, ZIPCode) SaleIDDateCustomerID / / / / CustomerIDFirstNameLastNameAddressCityStateZIP 15023MaryJones111 ElmChicagoIL MiguelSanchez222 OroMadrid 94552MadelineO’Reilly333 TamDublin Sale(SaleID, SaleDate, CustomerID) Customer(CustomerID, FirstName, LastName, Address, City, State, ZIPCode) Split SaleForm2 into Sale and Customer

DATABASE 35 Third Normal Form Tables

DATABASE 36 Third Normal Form Tables Customer(CustomerID, FirstName, LastName, Address, City, State, ZIPCode) Sale(SaleID, SaleDate, CustomerID) SaleItems(SaleID, ItemID, Quantity) Item(ItemID, Description, ListPrice, QuantityOnHand)

DATABASE 37 3NF Rules/Procedure  Split out repeating sections  Be sure to include a key from the parent section in the new piece so the two parts can be recombined.  Verify that the keys are correct  Is each row uniquely identified by the primary key?  Are one-to-many and many-to-many relationships correct?  Check “many” for keyed columns and “one” for non-key columns.  Make sure that each non-key column depends on the whole primary key and nothing but the key.  No hidden dependencies.

DATABASE 38 Checking Your Work (Quality Control)  Look for one-to-many relationships.  Many side should be keyed (underlined).  e.g., VideosRented(TransID, VideoID,...).  Check each column and ask if it should be 1 : 1 or 1: M.  If add a key, renormalize.  Verify no repeating sections (1NF)  Check 3NF  Check each column and ask:  Does it depend on the whole key and nothing but the key?  Verify that the tables can be reconnected (joined) to form the original tables (draw lines).  Each table represents one object.  Enter sample data -- look for replication.

DATABASE 39 Boyce-Codd Normal Form (BCNF)  Business rules. (See the auto shop table in next slide) a. Each employee may have many specialties. b. Each specialty has many managers. c. Employee has only one manager for each specialty. d. Each manager has only one specialty. (have hidden dependency: Manager  Specialty in the table) Employee-Specialty(EID, Specialty, Manager) Employee(EID, Manager) Manager(Manager, Specialty) c d ab Split Employee-Specialty into Employee and Manager

DATABASE 40 Employee-Specialty Table (auto shop) EmployeeIDSpecialtyManager 0654body / paintingJohn 1493brakeRobert 1493tireBill 3920air conditioningDavid 4782brakeRobert 4782engineEric 4782transmissionKen 7395body / paintingSteve 8157electrical systemPeter

DATABASE 41 Fourth Normal Form (Keys)  Business rules.  Each employee has many specialties.  Each employee has many tools.  Tools and specialties are unrelated (hidden dependency). EmployeeTasks(EID, Specialty, ToolID) in 3rd normal form EmployeeSpecialty(EID, Specialty) EmployeeTools(EID, ToolID)

DATABASE 42 EmployeeTasks Table (auto shop) EmployeeIDSpecialtyToolID 0654body / paintingt braket tiret air conditioningt braket enginet transmissiont body / paintingt electrical systemt6350

DATABASE 43 Domain-Key Normal Form (DKNF) EmployeeTask(EmployeeID, TaskID, Tool) Business rules. Each employee performs many tasks with many tools. Each Tool can be used for many tasks, or Each task has a standard list of tools (but some employees may use others) Need to add: RequiredTools(TaskID, ToolID) But, it is really BCNF: TaskID  ToolID is hidden. But, this dependency might not have been explicitly stated.

DATABASE 44 EmployeeTask Table (auto shop) EmployeeIDTaskIDTool 0654ta3401hammer 1493ta5270screw driver 1493ta2793screw driver 3920ta4756pipe wrench 4782ta5270screw driver 4782ta1638wrench 4782ta5729screw driver 7395ta3401hammer 8157ta8294voltage meter

DATABASE 45 No Hidden Dependencies  The simple normalization rules:  Remove repeating sections  Each non-key column must depend on the whole key and nothing but the key.  There must be no hidden dependencies.  Solution: Split the table.  Make sure you can rejoin the two pieces to recreate the original data relationships.  For some hidden dependencies within keys, double-check the business assumption to be sure that it is realistic. Sometimes you are better off with a more flexible assumption.

DATABASE 46 Data Rules and Integrity  Simple business rules  Limits on data ranges Price > 0 Salary < 100,000 DateHired > 1/12/1995  Choosing from a set Gender = M, F, Unknown Jurisdiction=City, County, State, Federal  Referential Integrity  Foreign key values in one table must exist in the master table.  Rental(RentID, RentDate, C#,…)  C# is a foreign key  C# must exist in the customer table. RentIDRentDateC#… Rental C#NamePhone… 321Jones Sanchez Carson8738- Customer No data for this customer yet!

DATABASE 47 SQL Foreign Key (Oracle, SQL Server) CREATE TABLE Order (OIDNUMBER(9) NOT NULL, OdateDATE, CIDNUMBER(9), CONSTRAINT pk_Order PRIMARY KEY (OID), CONSTRAINT fk_OrderCustomer FOREIGN KEY (CID) REFERENCES Customer (CID) ON DELETE CASCADE )

DATABASE 48 Effect of Business Rules Key business rules: A player can play on only one team. There is one referee per match.

DATABASE 49 Business Rules 1 There is one referee per match. A player can play on only one team. Match(MatchID, DatePlayed, Location, RefID) Score(MatchID, TeamID, Score) Referee(RefID, Phone, Address) Team(TeamID, Name, Sponsor) Player(PlayerID, Name, Phone, DoB, TeamID) PlayerStats(MatchID, PlayerID, Points, Penalties) RefID and TeamID are not keys in the Match and Team tables, because of the one-to-one rules.

DATABASE 50 Business Rules 2 There can be several referees per match. A player can play on several teams (substitute), but only on one team per match. Match(MatchID, DatePlayed, Location, RefID) Score(MatchID, TeamID, Score) Referee(RefID, Phone, Address) Team(TeamID, Name, Sponsor) Player(PlayerID, Name, Phone, DoB, TeamID) PlayerStats(MatchID, PlayerID, Points, Penalties) To handle the many-to-many relationship, we need to make RefID and TeamID keys. But if you leave them in the same tables, the tables are not in 3NF. DatePlayed does not depend on RefID. Player Name does not depend on TeamID.

DATABASE 51 Business Rules 2: Normalized Match(MatchID, DatePlayed, Location) RefereeMatch(MatchID, RefID) Score(MatchID, TeamID, Score) Referee(RefID, Phone, Address) Team(TeamID, Name, Sponsor) Player(PlayerID, Name, Phone, DoB) PlayerStats(MatchID, PlayerID, TeamID, Points, Penalties) There can be several referees per match. A player can play on several teams (substitute), but only on one team per match.

DATABASE 52 Converting a Class Diagram to Normalized Tables Supplier Purchase Order Item Raw Materials Assembled Components Office Supplies Employee Manager 1* 1* * * subtypes 1*

DATABASE 53 One-to-Many Relationships Supplier Purchase Order 1* Supplier(SID, Name, Address, City, State, Zip, Phone) Employee(EID, Name, Salary, Address, …) PurchaseOrder(POID, Date, SID, EID) Employee 1* The many side becomes a key (underlined). Each PO has one supplier and employee. (Do not key SID or EID) Each supplier can receive many POs. (Key PO) Each employee can place many POs. (Key PO)

DATABASE 54 One-to-Many Sample Data Supplier Employee Purchase Order POIDDateSIDEID

DATABASE 55 Many-to-Many Relationships Purchase Order Item * * PurchaseOrder(POID, Date, SID, EID) POItem(POID, ItemID, Quantity, PricePaid) Item(ItemID, Description, ListPrice) * * 1 1 Each POID can have many Items (key/underline ItemID). Each ItemID can be on many POIDs (key POID). Need the new intermediate table (POItem) because: You cannot put ItemID into PurchaseOrder because Date, SID, and EID do not depend on the ItemID. You cannot put POID into Item because Description and ListPrice do not depend on POID. Purchase Order Item * * POItem 1 1

DATABASE 56 Many-to-Many Sample Data POIDDateSIDEID / / / / POIDItemIDQuantityPrice Purchase Order Item POItem ItemIDDescriptionListPrice Staples Paper Wire Sheet steel Brake assembly152.00

DATABASE 57 N-ary Associations Employee Name... Component CompID Type Name Product ProductID Type Name * * * Assembly EmployeeID CompID ProductID 1 1 1

DATABASE 58 Generalization or Subtypes Item Raw Materials Assembled Components Office Supplies Item(ItemID, Description, ListPrice) RawMaterials(ItemID, Weight, StrengthRating) AssembledComponents(ItemID, Width, Height, Depth) OfficeSupplies(ItemID, BulkQuantity, Discount) Add new tables for each subtype. Use the same key as the generic type (ItemID)--one-to-one relationship. Add the attributes specific to each subtype.

DATABASE 59 Subtypes Sample Data ItemIDDescriptionListPrice Staples Paper Wire Sheet steel Brake assembly ItemIDWeightStrengthRating ItemIDWidthHeightDepth Item RawMaterials AssembledComponents OfficeSupplies ItemIDBulkQuantityDiscount % %

DATABASE 60 Composition Bicycle Size Model Type … Wheels Crank Stem Bicycle SerialNumber ModelType WheelID CrankID StemID … Components ComponentID Category Description Weight Cost

DATABASE 61 Recursive Relationships Employee Manager Employee Employee(EID, Name, Salary, Address, Manager) 1* Add a manager column that contains Employee IDs. An employee can have only one manager. (Manager is not a key.) A manager can supervise many employees. (EID is a key.)

DATABASE 62 Normalization Examples  Possible topics  Auto repair  Auto sales  Department store  Hair stylist  HRM department  Law firm  Manufacturing  National Park Service  Personal stock portfolio  Pet shop  Restaurant  Social club  Sports team

DATABASE 63 Multiple Views & View Integration  Collect multiple views  Documents  Reports  Input forms  Create normalized tables from each view  Combine the views into one complete model.  Keep meta-data in a data dictionary  Type of data  Size  Volume  Usage  Example  Federal Emergency Management Agency (FEMA). Disaster planning and relief.  Make business assumptions as necessary, but try to keep them simple.

DATABASE 64 The Pet Store: Sales Form Sales(SaleID, Date, CustomerID, Name, Address, City, State, Zip, EmployeeID, Name, (AnimalID, Name, Category, Breed, DateOfBirth, Gender, Registration, Color, ListPrice, SalePrice), (ItemID, Description, Category, ListPrice, SalePrice, Quantity))

DATABASE 65 The Pet Store: Purchase Animals AnimalOrder(OrderID, OrderDate, ReceiveDate, SupplierID, Name, Contact, Phone, Address, City, State, Zip, EmployeeID, Name, Phone, DateHired, (AnimalID, Name, Category, Breed, Gender, Registration, Cost), ShippingCost)

DATABASE 66 The Pet Store: Purchase Merchandise MerchandiseOrder(PONumber, OrderDate, ReceiveDate, SupplierID, Name, Contact, Phone, Address, City, State, Zip, EmployeeID, Name, HomePhone, (ItemID, Description, Category, Price, Quantity, QuantityOnHand), ShippingCost)

DATABASE 67 Pet Store Normalization Sale(SaleID, Date, CustomerID, EmployeeID) SaleAnimal(SaleID, AnimalID, SalePrice) SaleItem(SaleID, ItemID, SalePrice, Quantity) Customer(CustomerID, Name, Address, City, State, Zip) Employee(EmployeeID, Name) Animal(AnimalID, Name, Category, Breed, DateOfBirth, Gender, Registration, Color, ListPrice) Merchandise(ItemID, Description, Category, ListPrice) AnimalOrder(OrderID, OrderDate, ReceiveDate, SupplierID, EmpID, ShipCost) AnimalOrderItem(OrderID, AnimalID, Cost) Supplier(SupplierID, Name, Contact, Phone, Address, City, State, Zip) Employee(EmployeeID, Name, Phone, DateHired) Animal(AnimalID, Name, Category, Breed, Gender, Registration, Cost) MerchandiseOrder(PONumber, OrderDate, ReceiveDate, SID, EmpID, ShipCost) MerchandiseOrderItem(PONumber, ItemID, Quantity, Cost) Supplier(SupplierID, Name, Contact, Phone, Address, City, State, Zip) Employee(EmployeeID, Name, Phone) Merchandise(ItemID, Description, Category, QuantityOnHand)

DATABASE 68 Pet Store View Integration Sale(SaleID, Date, CustomerID, EmployeeID) SaleAnimal(SaleID, AnimalID, SalePrice) SaleItem(SaleID, ItemID, SalePrice, Quantity) Customer(CustomerID, Name, Address, City, State, Zip) Employee(EmployeeID, Name, Phone, DateHired) Animal(AnimalID, Name, Category, Breed, DateOfBirth, Gender, Registration, Color, ListPrice, Cost) Merchandise(ItemID, Description, Category, ListPrice, QuantityOnHand) AnimalOrder(OrderID, OrderDate, ReceiveDate, SupplierID, EmpID, ShipCost) AnimalOrderItem(OrderID, AnimalID, Cost) Supplier(SupplierID, Name, Contact, Phone, Address, City, State, Zip) Employee(EmployeeID, Name, Phone, DateHired) Animal(AnimalID, Name, Category, Breed, Gender, Registration, Cost) MerchandiseOrder(PONumber, OrderDate, ReceiveDate, SID, EmpID, ShipCost) MerchandiseOrderItem(PONumber, ItemID, Quantity, Cost) Supplier(SupplierID, Name, Contact, Phone, Address, City, State, Zip) Employee(EmployeeID, Name, Phone) Merchandise(ItemID, Description, Category, QuantityOnHand)

DATABASE 69 Pet Store Class Diagram

DATABASE 70 Rolling Thunder Integration Example Bicycle Assembly form. The main EmployeeID control is not stored directly, but the value is entered in the assembly column when the employee clicks the column.

DATABASE 71 Initial Tables for Bicycle Assembly BicycleAssembly ( SerialNumber, Model, Construction, FrameSize, TopTube, ChainStay, HeadTube, SeatTube, PaintID, PaintColor, ColorStyle, ColorList, CustomName, LetterStyle, EmpFrame, EmpPaint, BuildDate, ShipDate, (Tube, TubeType, TubeMaterial, TubeDescription), (CompCategory, ComponentID, SubstID, ProdNumber, EmpInstall, DateInstall, Quantity, QOH) ) Bicycle (SerialNumber, Model, Construction, FrameSize, TopTube, ChainStay, HeadTube, SeatTube, PaintID, ColorStyle, CustomName, LetterStyle, EmpFrame, EmpPaint, BuildDate, ShipDate) Paint (PaintID, ColorList) BikeTubes (SerialNumber, TubeID, Quantity) TubeMaterial (TubeID, Type, Material, Description) BikeParts (SerialNumber, ComponentID, SubstID, Quantity, DateInstalled, EmpInstalled) Component (ComponentID, ProdNumber, Category, QOH)

DATABASE 72 Rolling Thunder: Purchase Order

DATABASE 73 RT Purchase Order: Initial Tables PurchaseOrder (PurchaseID, PODate, EmployeeID, FirstName, LastName, ManufacturerID, MfgName, Address, Phone, CityID, CurrentBalance, ShipReceiveDate, (ComponentID, Category, ManufacturerID, ProductNumber, Description, PricePaid, Quantity, ReceiveQuantity, ExtendedValue, QOH, ExtendedReceived), ShippingCost, Discount) PurchaseOrder (PurchaseID, PODate, EmployeeID, ManufacturerID, ShipReceiveDate, ShippingCost, Discount) Employee (EmployeeID, FirstName, LastName) Manufacturer (ManufacturerID, Name, Address, Phone, Address, CityID, CurrentBalance) City (CityID, Name, ZipCode) PurchaseItem (PurchaseID, ComponentID, Quantity, PricePaid, ReceivedQuantity) Component (ComponentID, Category, ManufacturerID, ProductNumber, Description, QOH)

DATABASE 74 Rolling Thunder: Transactions

DATABASE 75 RT Transactions: Initial Tables ManufacturerTransactions (ManufacturerID, Name, Phone, Contact, BalanceDue, (TransDate, Employee, Amount, Description) ) Manufacturer (ManufacturerID, Name, Phone, Contact, BalanceDue) ManufacturerTransaction (ManufacturerID, TransactionDate, EmployeeID, Amount, Description)

DATABASE 76 Rolling Thunder: Components

DATABASE 77 RT Components: Initial Tables ComponentForm (ComponentID, Product, BikeType, Category, Length, Height, Width, Weight, ListPrice,Description, QOH, ManufacturerID, Name, Phone, Contact, Address, ZipCode, CityID, City, State, AreaCode) Component (ComponentID, ProductNumber, BikeType, Category, Length, Height, Width,Weight, ListPrice, Description, QOH, ManufacturerID) Manufacturer (ManufacturerID, Name, Phone, Contact, Address, ZipCode, CityID) City (CityID, City, State, ZipCode, AreaCode)

DATABASE 78 RT: Integrating Tables POMfr(ManufacturerID, Name, Address, Phone, CityID, CurrentBalance), MfgMfr(ManufacturerID, Name, Phone, Contact, BalanceDue) CompMfr(ManufacturerID, Name, Phone, Contact, Address, ZipCode, CityID) Duplicate Manufacturer tables: Note that each form can lead to duplicate tables. Look for tables with the same keys, but do not expect them to be named exactly alike. Find all of the data and combine it into one table. Manufacturer(ManufacturerID, Name, Contact, Address, Phone, Address, CityID, |ZipCode, CurrentBalance)

DATABASE 79 RT Example: Integrated Tables Bicycle(SerialNumber, Model, Construction, FrameSize, TopTube, ChainStay, HeadTube, SeatTube,PaintID, ColorStyle, CustomName, LetterStyle, EmpFrame, EmpPaint, BuildDate, ShipDate) Paint(PaintID, ColorList) BikeTubes(SerialNumber, TubeID, Quantity) TubeMaterial(TubeID, Type, Material, Description) BikeParts(SerialNumber, ComponentID, SubstID, Quantity, DateInstalled, EmpInstalled) Component(ComponentID, ProductNumber, BikeType, Category, Length, Height, Width, Weight, ListPrice, Description, QOH, ManufacturerID) PurchaseOrder(PurchaseID, PODate, EmployeeID, ManufacturerID, ShipReceiveDate, ShippingCost, Discount) PurchaseItem(PurchaseID, ComponentID, Quantity, PricePaid, ReceivedQuantity) Employee(EmployeeID, FirstName, LastName) Manufacturer(ManufacturerID, Name, Contact, Address, Phone, CityID, ZipCode, CurrentBalance) ManufacturerTransaction(ManufacturerID, TransactionDate, EmployeeID, Amount, Description, Reference) City(CityID, City, State, ZipCode, AreaCode)

DATABASE 80 CustomerID Phone FirstName LastName Address ZipCode CityID BalanceDue Customer CustomerID TransDate EmployeeID Amount Description Reference CustomerTrans StoreID StoreName Phone ContacFirstName ContactLastName Address Zipcode CityID RetailStore State TaxRate StateTaxRate SerialNumber CustomerID ModelType PaintID FrameSize OrderDate StartDate ShipDate ShipEmployee FrameAssembler Painter Construction WaterBottle CustomName LetterStyleID StoreID EmployeeID TopTube ChainStay HeadTubeAngle SeatTueAngle ListPrice SalePrice SalesTax SaleState ShipPrice FramePrice ComponentList Bicycle CityID ZipCode City State AreaCode Population1990 Population1980 Country Latitude Longitude Customer ModelType Description ComponentID ModelType Paint EmployeeID TaxpayerID LastName FirstName HomePhone Address ZipCode CityID DateHired DateReleased CurrentManager SalaryGrade Salary Title WorkArea Employee SerialNumber TubeID Quantity BicycleTube ModelType MSize TopTube ChainStay TotalLength GroundClearance HeadTubeAngle SeatTubeAngle ModelSize LetterStyle Description LetterStyle PurchaseID EmployeeID ManufacturerID TotalList ShippingCost Discount OrderDate ReceiveDate AmountDue PurchaseOrder SerialNumber TubeName TubeID Length BikeTubes SerialNumber ComponentID SubstituteID Location Quantity DateInstalled EmployeeID BikeParts PurchaseID ComponentID PricePaid Quantity QuantityReceived PurchaseItem ManufacturerID ManufacturerName ContactName Phone Address ZipCode CityID BalanceDue Manufacturer CompGroup GroupName BikeType Year EndYear Weight Groupo ComponentID ManufacturerID ProductNumber Road Category Length Height Width Weight Year EndYear Description ListPrice EstimatedCost QuantityOnHand Component ManufacturerID TransactionDate EmployeeID Amount Description Reference ManufacturerTrans TubeID Material Description Diameter Thickness Roundness Weight Stiffness ListPrice Construction TubeMaterial GroupID ComponentID GroupCompon ComponentName AssemblyOrder Description ComponentName PaintID ColorName ColorStyle ColorList DateIntroduced DateDiscontinued Rolling Thunder Tables

DATABASE 81 View Integration (FEMA Example 1) Team Roster Team#Date FormedLeader Home BaseNameFaxPhone Response time (days)Address, C,S,ZHome phone Total Salary Team Members/Crew IDNameHome phoneSpecialtyDoBSSNSalary  This first form is kept for each team that can be called on to help in emergencies.

DATABASE 82 View Integration (FEMA Example 2)  Major problems are reported to HQ to be prioritized and scheduled for correction. Disaster NameHQ LocationOn-Site Problem Report Local AgencyCommander Political Contact Date ReportedAssigned Problem#Severity Problem Description Reported By:SpecialtySpecialty Rating Verified By:SpecialtySpecialty Rating SubProblem Details Total Est. Cost Sub Prob#CategoryDescriptionActionEst. Cost

DATABASE 83 View Integration (FEMA Example 3)  On-site teams examine buildings and file a report on damage at that location. Location Damage AnalysisDate Evaluated LocationID, AddressTeam LeaderTitleRepair Priority Latitude, LongitudeCellular PhoneDamage Description Item Loss Total Estimated Damage Total RoomDamage Descrip.Damage% ItemValue$Loss

DATABASE 84 View Integration (FEMA Example 3a)  Location Analysis(LocationID, MapLatitude, MapLongitude, Date, Address, Damage, PriorityRepair, Leader, LeaderPhone, LeaderTitle, (Room, Description, PercentDamage, (Item, Value, Loss)))

DATABASE 85 View Integration (FEMA Example 4)  Teams file task completion reports. If a task is not completed, the percentage accomplished is reported as the completion status. Task Completion ReportDate Disaster NameDisaster RatingHQ Phone Problem#SupervisorDate Total Expenses Problem#SupervisorDate Total Expenses SubProblemTeam#Team SpecialtyCompletionStatusCommentExpenses

DATABASE 86 View Integration (FEMA Example 4a)  TasksCompleted(Date, DisasterName, DisasterRating, HQPhone, (Problem#, Supervisor, (SubProblem, Team#, CompletionStatus, Comments, Expenses))

DATABASE 87 DBMS Table Definition  Enter Tables  Columns  Keys  Data Types Text Memo Number  Byte  Integer, Long  Single, Double Date/Time Currency AutoNumber (Long) Yes/No OLE Object  Descriptions  Column Properties  Format  Input Mask  Caption  Default  Validation Rule  Validation Text  Required & Zero Length  Indexed  Relationships  One-to-One  One-to-Many  Referential Integrity  Cascade Update/Delete  Define before entering data

DATABASE 88 Table Definition in Access Key Numeric Subtypes or text length

DATABASE 89 Graphical Table Definition in Oracle

DATABASE 90 Graphical Table Definition in SQL Server

DATABASE 91 SQL Table Definition CREATE TABLE Animal ( AnimalID INTEGER, Name VARCHAR2(50), Category VARCHAR2(50), Breed VARCHAR2(50), DateBorn DATE, Gender VARCHAR2(50)CHECK (Gender='Male' Or Gender='Female' Or Gender='Unknown' Or Gender Is Null), Registered VARCHAR2(50), Color VARCHAR2(50), ListPrice NUMBER(38,4) DEFAULT 0, Photo LONG RAW, ImageFile VARCHAR2(250), ImageHeight INTEGER, ImageWidth INTEGER, CONSTRAINT pk_Animal PRIMARY KEY (AnimalID), CONSTRAINT fk_BreedAnimal FOREIGN KEY (Category,Breed) REFERENCES Breed(Category,Breed) ON DELETE CASCADE, CONSTRAINT fk_CategoryAnimal FOREIGN KEY (Category) REFERENCES Category(Category) ON DELETE CASCADE );

DATABASE 92 Oracle Databases  For Oracle and SQL Server, it is best to create a text file that contains all of the SQL statements to create the table.  It is usually easier to modify the text table definition.  The text file can be used to recreate the tables for backup or transfer to another system.  To make major modifications to the tables, you usually create a new table, then copy the data from the old table, then delete the old table and rename the new one. It is much easier to create the new table using the text file definition.  Be sure to specify Primary Key and Foreign Key constraints.  Be sure to create tables in the correct order—any table that appears in a Foreign Key constraint must first be created. For example, create Customer before creating Order.  In Oracle, to substantially improve performance, issue the following command once all tables have been created: Analyze table Animal compute statistics;

DATABASE 93 Data Volume  Estimate the total size of the database.  Current.  Future growth.  Guide for hardware and software purchases.  For each table.  Use data types to estimate the number of bytes used for each row.  Multiply by the estimated number of rows.  Add the value for each table to get the total size.  For concatenated keys (and similar tables).  OrderItems(O#, Item#, Qty)  Hard to “know” the total number of items ordered. Start with the total number of orders. Multiply by the average number of items on a typical order.  Need to know time frame or how long to keep data.  Do we store all customer data forever?  Do we keep all orders in the active database, or do we migrate older ones?

DATABASE 94 Data Volume Example Customer(C#, Name, Address, City, State, Zip) Order(O#, C#, Odate) OrderItem(O#, P#, Quantity, SalePrice) Row: = 76 Row: = 16 Row: = 20  Business rules  Three year retention.  1000 customers.  Average 10 orders per customer per year.  Average 5 items per order.  Customer76 * ,000  Order16 * 30,000480,000  OrderItem20 * 150,0003,000,000  Total3,556,000

DATABASE 95 Appendix: Formal Definitions: Terms FormalDefinitionInformal RelationA set of attributes with data that changes over time. Often denoted R. Table AttributeCharacteristic with a real-world domain. Subsets of attributes are multiple columns, often denoted X or Y. Column TupleThe data values returned for specific attribute sets are often denoted as t[X] Row of data SchemaCollection of tables and constraints/relationships Functional dependency X  YBusiness rule dependency

DATABASE 96 Appendix: Functional Dependency Derives from a real-world relationship/constraint. Denoted X  Yfor sets of attributes X and Y Holds when any rows of data that have identical values for X attributes also have identical values for their Y attributes: If t1[X] = t2[X], then t1[Y] = t2[Y] X is also known as a determinant if X is non-trivial (not a subset of Y).

DATABASE 97 Appendix: Keys Keys are attributes that are ultimately used to identify rows of data. A key K (sometimes called candidate key) is a set of attributes (1)With FD K  Uwhere U is all other attributes in the relation (2)If K’ is a subset of K, then there is no FD K’  U A set of key attributes functionally determines all other attributes in the relation, and it is the smallest set of attributes that will do so (there is no smaller subset of K that determines the columns.)

DATABASE 98 Appendix: First Normal Form A relation is in first normal form (1NF) if and only if all attributes are atomic. Atomic attributes are single valued, and cannot be composite, multi- valued or nested relations. Example: Customer(CID, Name: First + Last, Phones, Address) CIDName: First + LastPhonesAddress 111Joe Jones Main

DATABASE 99 Appendix: Second Normal Form A relation is in second normal form (2NF) if it is in 1NF and each non-key attribute is fully functionally dependent on the primary key. K  Aifor each non-key attribute Ai That is, there is no subset K’ such that K’  Ai Example: OrderProduct(OrderID, ProductID, Quantity, Description) OrderIDProductIDQuantityDescription 32151Blue Hose 32162Pliers 33151Blue Hose

DATABASE 100 Appendix: Transitive Dependency Given functional dependencies: X  Y and Y  Z, the transitive dependency X  Z must also hold. Example: There is an FD between OrderID and CustomerID. Given the OrderID key attribute, you always know the CustomerID. There is an FD between CustomerID and the other customer data, because CustomerID is the primary key. Given the CustomerID, you always know the corresponding attributes for Name, Phone, and so on. Consequently, given the OrderID (X), you always know the corresponding customer data by transitivity.

DATABASE 101 Appendix: Third Normal Form A relation is in third normal form if and only if it is in 2NF and no non- key attributes are transitively dependent on the primary key. That is, K  Aifor each attribute, (2NF) and There is no subset of attributes X such that K  X  Ai Example: Order(OrderID, OrderDate, CustomerID, Name, Phone) OrderIDOrderDateCustomerIDNamePhone 325/5/20041 Jones /5/20042Hong /6/20041Jones

DATABASE 102 Appendix: Boyce-Codd Normal Form A relation is in Boyce-Codd Normal Form (BCNF) if and only if it is in 3NF and every determinant is a candidate key (or K is a superkey). That is, K  Aifor every attribute, and there is no subset X (key or nonkey) such that X  Ai where X is different from K. EIDSpecialityManagerID 32Drill1 33Weld2 34Drill1 Example: Employees can have many specialties, and many employees can be within a specialty. Employees can have many managers, but a manager can have only one specialty: Mgr  Specialty EmpSpecMgr(EID, Specialty, ManagerID) FD ManagerID  Specialty is not currently a key.

DATABASE 103 Appendix: Multi-Valued Dependency A multi-valued dependency (MVD) exists when there are at least three attributes in a relation (A, B, and C; and they could be sets), and one attribute (A) determines the other two (B and C) but the other two are independent of each other. That is, A  B and A  C but B and C have no FDs Example: Employees have many specialties and many tools, but tools and specialties are not directly related.

DATABASE 104 Appendix: Fourth Normal Form A relation is in fourth normal form 4NF if and only if it is in BCNF and there are no multi-valued dependencies. That is, all attributes of R are also functionally dependent on A. If A   B, then all attributes of R are also functionally dependent on A: A  Aifor each attribute. Example: EmpSpecTools(EID, Specialty, ToolID) EmpSpec(EID, Specialty) EmpTools(EID, ToolID)

DATABASE 105 DBMS Chapter 3 Homework  Due: 2/25/2009  Pages in textbook:  Review Questions: 1, 2, 3, 6, 10  Exercises: 4, 6  Note: Use Access to draw the class diagram for each exercise