announcements n difference between “excused” and “absent” n office hours next week may not...
Post on 20-Dec-2015
217 views
TRANSCRIPT
![Page 1: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/1.jpg)
Announcements
Difference between “excused” and “absent” Office hours next week
• May not be here Monday• Tuesday: 1:00 to 2:00• Wednesday: 10:00 to 11:00• Friday: 1:30 to 2:30
Questions regarding Syllabus, Class?
![Page 2: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/2.jpg)
The Coffee Roasting Company
Phase I
Designing the Database
![Page 3: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/3.jpg)
Overview
Apply normalization process to purchasing cycle documents• Purchase Order• Receiving Report• Payment Voucher
Combine three document sub-schemas into overall schema for purchasing cycle
![Page 4: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/4.jpg)
What is a Database?
Collection of data organized into:• Tables (similar to a spreadsheet) – typically
associated with an object/item of interest such as a customer, product, etc.
– Columns represent fields• Attributes and characteristics that describe the object/item in
the table• A customer has a name, address, phone, etc.
– Rows represent an instance of each object/item• Plow House, Stayton OR, (503) 123-4567
![Page 5: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/5.jpg)
Database Rules
Only one type of record in each table• If put both customers and suppliers in same
table, how can you tell a customer from a supplier?
• If use an “external entity” table for both customers and suppliers, then a field in the table would be used to identify the type of external entity.
![Page 6: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/6.jpg)
Database Rules
Each record (row) in a table must be unique• If two rows were exactly the same:
• Plow House, Stayton OR, (503) 123-4567• Plow House, Stayton OR, (503) 123-4567
– Is this an error – was the record entered twice by mistake
– Which record should you use?
![Page 7: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/7.jpg)
Database Rules
Each row within a table should have a primary key• Given that each record must be different in
some way, how can you easily find a given record? That is, what field should you use to find each different record
• Plow House, Stayton OR, (503) 123-4567• Plow House, Corvallis OR, (541) 789-1234• Plow House, Bend OR, (503) 987-6543• Hitching Post, Bend OR, (503) 987-1234
![Page 8: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/8.jpg)
Database Rules Characteristics of a Primary Key
• Must be unique for each row in the table• Must be stable over the life of the database
– Names are not a good choice – names change– Normally assign an ID number or code
• Hence extensive use of SSN
– Internally generated numbers and codes will be unique and will not change
• Should make sense from a business perspective– Phone number?
• Easy to use– Starting to use alphanumeric codes instead of numbers
![Page 9: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/9.jpg)
Design of the Database
Purpose: Capture the information off of the Purchase Cycle forms and set up a database that:• Allows easy search and manipulation• Reduces amount of redundant information• Allows for future expansion and modification of
data
![Page 10: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/10.jpg)
What is Database Design?
Process of determining the content and arrangement of data needed to support various activities.
Could use a “Common-sense” approach• No way to assure that design works as intended
We will use the “Normalization” Model
![Page 11: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/11.jpg)
What is Normalization? Technique to “optimize” the design of a
Relational Database• Break large complex table into smaller, simpler
tables• Ensure that the smaller tables fit back together.
– When break a Whole into its Parts, need to be sure you can recreate the Whole from the Parts
![Page 12: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/12.jpg)
What is Normalization? Must be familiar with business processes
• Must understand relationships between purchase order, receiving report and payment voucher
– Can multiple purchases arrive on the same receiving report?
– Can a single purchase arrive on multiple receiving reports?
– Can multiple purchases be paid with the same payment voucher?
– If multiple shipments are received, when do we pay?
![Page 13: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/13.jpg)
Overview of Normalization
1NF: Create two-dimensional tables• Identify and define relevant data elements• Remove repeating groups• Select primary key
2NF: Ensure full functional dependence on Primary Key
3NF: Remove transitive dependencies
![Page 14: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/14.jpg)
Normalization Rules
No repeating groups• Typically occurs when multiple products on
single form• Each product should occupy a separate row in
the table
![Page 15: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/15.jpg)
![Page 16: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/16.jpg)
First Normal FormPurpose
Organize data in table • Rows and Columns• Allows flexibility for future expansion
Does not reduce redundancy• Merely an organization step to set up for
normalization• Does include specification of the primary
keys
![Page 17: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/17.jpg)
First Normal FormStep 1
Identify and define relevant data elements• Usually, do not include calculated fields
– Can be easily derived when needed
• Exception is when need to store information for historical purposes
– We will compute the sales price for a product– Once computed and conveyed to the customer,
should not change the price– For example, the underlying base price may change
after the order confirmation is sent to the customer
![Page 18: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/18.jpg)
First Normal FormStep 1 – cont’d
As identify fields, define:• Data element name• Field name within database (normally shorter
without spaces or special characters)• Type of data to be stored (number, text, date,
etc)• Size and format of stored data
– Number can be integer, single precision, currency, …
![Page 19: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/19.jpg)
First Normal FormStep 1 – cont’d
Which items should be included from this form?
![Page 20: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/20.jpg)
![Page 21: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/21.jpg)
First Normal FormStep 2
Select relevant data elements Eliminate Repeating Groups
• Repeating groups occur when multiple items allowed on form
– Product name, type, pounds ordered, cost-per-pound are repeated on form
• Information on each product ordered should be entered into separate row in table
![Page 22: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/22.jpg)
First Normal FormRepeating Groups
What information is repeated on this form?
![Page 23: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/23.jpg)
Information on each product ordered should be entered into separate row in table• Note that we can now add multiple products per
order by adding rows to the table.
![Page 24: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/24.jpg)
First Normal FormStep 1
Select relevant data elements Eliminate Repeating Groups
• Each product ordered is entered into separate row in table
Select Primary Key• Combination of values within certain columns
used to distinguish one row from another
![Page 25: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/25.jpg)
Select Primary Key
On forms with repeating information (products):• Need one component of key to identify
information in the non-repeating section – Top portion of PO form
• Need one component of key to identify information in the repeating section
– Bottom portion of PO form
![Page 26: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/26.jpg)
First Normal FormSelect Primary Key
Which fields to use? Non-repeating, Repeating
![Page 27: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/27.jpg)
Select Primary Key Need to develop a product code to use instead of
product name• Internally assigned, so we know they are unique and
stable• As new products are added, we will assign new codes• Easy to use
– First letters of productname
![Page 28: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/28.jpg)
Select Primary Key
Pick combination of:• Purchase Order Number
– internally assigned, unique
• Product Code– internally assigned, unique
![Page 29: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/29.jpg)
Purchase Order Form inFirst Normal Form
PONum and ProdCode will be primary key No repeating columns of information
![Page 30: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/30.jpg)
Second Normal Form
Only required if primary key is “concatenated”• Combination of data elements used in key
Technical definition is Full Functional Dependence• All components of key are needed to identify each
non-key field in the table Purpose: Reduce redundancy & eliminate
modification anomalies • What happens if need to change delivery date of PO
412004?
![Page 31: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/31.jpg)
Second Normal Form Identify all possible combinations of Primary
Key Components• PONum + ProdCode• PONum• ProdCode
For each non-key data element, determine which combination of key components is needed for unique identification• May need to look through multiple documents to
understand relationships
![Page 32: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/32.jpg)
Second Normal FormWhich non-key fields are functionally dependent on
PONum? ProdCode? Combination?
![Page 33: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/33.jpg)
![Page 34: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/34.jpg)
Business Process Assumptions Unit Cost is negotiated
• Note cost difference between 412005 and 412006
![Page 35: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/35.jpg)
Second Normal Form PO Products – Combination of PONum &
ProdCode is primary key.• All non-key fields have full functional dependence
on PONum & ProdCode?– Do we always order 400 pounds of GA?
![Page 36: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/36.jpg)
Second Normal Form Products – ProdCode is primary key.
• All non-key fields have full functional dependence on ProdCode
![Page 37: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/37.jpg)
Second Normal Form PO Details – PONum is primary key.
• All non-key fields have full functional dependence on PONum
![Page 38: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/38.jpg)
Third Normal Form Remove Transitive Dependencies
• Technical definition: a non-key field has functional dependence on a non-key field
• Non-Technical: Fields A, B and C where A is key.
– By definition, B and C have dependence on A– What if you could also determine C based on
knowledge of B
![Page 39: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/39.jpg)
Transitive Dependency• Example
– Supplier name is not part of key, yet name can be used to determine sales office, contact, and phone
• Assuming one contact per supplier
![Page 40: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/40.jpg)
Solution - split Supplier Information into another table
When create supplier table, must select a primary key• Name is not a good choice for the key
Create an internally assigned Supplier Code
![Page 41: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/41.jpg)
Transitive Dependency• Another problem – Ship Office
– Droubi’s has two shipping offices – name/code does not uniquely identify shipping office – need separate table
![Page 42: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/42.jpg)
Solution - split Supplier Shipping Information into another table
Create supplier shipping code
![Page 43: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/43.jpg)
Third Normal Form Tables
![Page 44: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/44.jpg)
Still have a transitive dependency
![Page 45: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/45.jpg)
Transitive Dependency
Does Zip Code determines City and State?
![Page 46: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/46.jpg)
Third Normal Form Tables
![Page 47: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/47.jpg)
Third Normal Form Tables
One-to-Many Relationships• Single-field primary key always has cardinality of
One• Multiple-field primary key has cardinality of Many• Non-key field that is part of a relationship has
cardinality of Many
![Page 48: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/48.jpg)
Receiving Report
First Normal Form• Select and define data elements of interest• Eliminate repeating groups• Identify primary key• Specify any assumptions you had to make.
![Page 49: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/49.jpg)
![Page 50: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/50.jpg)
![Page 51: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/51.jpg)
Business Process Assumptions
Only one receiving warehouse Do we need to assume that the quantities
received are the same as quantities ordered?
![Page 52: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/52.jpg)
Eliminate Repeating Groups
Multiple data elements for:• Product Name• Product Type• Quantity Received
Place each “Product” in separate row
![Page 53: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/53.jpg)
Identify Primary Key
Select data element from top (non-repeating) and bottom (repeating)
Best Key: Combination of:• RRNumber• Product Code
– Created for each product
![Page 54: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/54.jpg)
Second Normal Form
Is the FNF table in Second Normal Form?• Why or why not?
If not, what are the functional dependencies? What business process assumptions did you
make?
![Page 55: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/55.jpg)
Second Normal Form
Required since primary key is concatenated Three Combinations
• RRNum• ProdCode• RRNum + ProdCode
![Page 56: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/56.jpg)
![Page 57: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/57.jpg)
Third Normal Form
Are the SNF tables in Third Normal Form?• Why or why not?
If not, what are the transitive dependencies? What business process assumptions did you
make?
![Page 58: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/58.jpg)
Third Normal Form From business perspective:
• Makes sense to put supplier information in separate table -- reduces redundancy
From Normalization perspective:• Transitive dependence between:
– RRNum– Supplier Name– Supplier Ship Address, CSZ
• Will also deal with transitive dependence between zip and city state
![Page 59: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/59.jpg)
Practice Exercise
![Page 60: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/60.jpg)
![Page 61: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/61.jpg)
Payment Voucher
First Normal Form• Select and define data elements of interest• Eliminate repeating groups• Identify primary key• Business Process Assumptions
![Page 62: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/62.jpg)
Primary Key?
One from non-repeating section• PV-Num
One from each repeating section• ProdCode• RRNum
![Page 63: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/63.jpg)
Second Normal Form
Is the FNF table in Second Normal Form?• Why or why not?
If not, what are the functional dependencies? What business process assumptions did you
make?
![Page 64: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/64.jpg)
Second Normal Form
Required since concatenated primary key• Seven combinations
– PVNum ProdCode RRNum– PVNum + ProdCode– PVNum + RRNum– RRNum + ProdCode– PVNum + ProdCode + RRNum
![Page 65: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/65.jpg)
Identify Functional Dependencies
![Page 66: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/66.jpg)
![Page 67: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/67.jpg)
Third Normal Form
Are the SNF tables in Third Normal Form?• Why or why not?
If not, what are the transitive dependencies? What business process assumptions did you
make?
![Page 68: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/68.jpg)
Third Normal Form
Transitive dependencies?• Supplier Information
– PVNum identifies Supplier Name– Supplier Name identifies Supplier Address, CSZ
![Page 69: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/69.jpg)
Common Tables?
ZipCityState Products Supplier Shipping Location
![Page 70: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/70.jpg)
Database Schema for Purchasing Cycle
These are the tables and relationships used to generate the Purchase Order, Receiving Report, and Payment Voucher
![Page 71: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/71.jpg)
Assignment Design Third Normal Form Datadase for Order
Fulfillment of CRC • You must be able to create these reports from data
within the tables. – Sales Order Confirmation– Bill of Lading– Backorder Notice
• Focus on the data, not the process– Do not worry about what triggers the Backorder Notice,
just be able to create the report from the underlying tables
![Page 72: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/72.jpg)
![Page 73: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/73.jpg)
![Page 74: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/74.jpg)
![Page 75: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/75.jpg)
Assignment Once you have designed the tables:
Use Access to document the relationships between the tables and as your data dictionary Create empty tables in Access Enter the abbreviated field names, specify the data
type and size, enter the long name as the caption Set the primary key fields
![Page 76: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/76.jpg)
![Page 77: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/77.jpg)
![Page 78: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/78.jpg)
Assignment Use the “relationships” feature in Access to
define the relationships between tables Always set to enforce referential integrity
![Page 79: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/79.jpg)
Assignment Provide a description of the processes that
you used to design the third normal form tables. Specifically: You must justify your selection of fields for the
primary keys You must describe how you know that each table
is in third normal form. Provide all assumptions you had to make
regarding the nature of the business operations to support the placement of the various data elements within the tables.
![Page 80: Announcements n Difference between “excused” and “absent” n Office hours next week May not be here Monday Tuesday: 1:00 to 2:00 Wednesday: 10:00 to 11:00](https://reader030.vdocuments.mx/reader030/viewer/2022032801/56649d535503460f94a2edfb/html5/thumbnails/80.jpg)
Questions?