Avoiding Database Anomalies - PowerPoint PPT Presentation

Loading...

PPT – Avoiding Database Anomalies PowerPoint presentation | free to download - id: 7057c4-MGJlM



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Avoiding Database Anomalies

Description:

Avoiding Database Anomalies Unnormalized Relation 3a. First Normal Form (1NF) A relation is in first normal form if it does not contain repeating groups. – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 18
Provided by: Jeffr358
Learn more at: http://www.jsu.edu
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Avoiding Database Anomalies


1
Avoiding Database Anomalies
2
Unnormalized Relation
3
3a. First Normal Form (1NF)
  • A relation is in first normal form if it does not
    contain repeating groups.

4
Unnormalized Relation
5
First Normal Form (1NF)
Changes to service names have to be made on each
line on which the the name appears.
6
First Normal Form (1NF)
Inconsistent data could result when the same
service name has several name variations.
7
First Normal Form (1NF)
New services can not be added unless there is an
existing transaction.
8
First Normal Form (1NF)
Deletion of an invoice could result in a loss of
service information.
9
Second Normal Form (2NF)
  • A relation is in second normal form if it is in
    first normal form and there are no partial
    dependencies. A partial dependency occurs when a
    table has a composite primary key and a non-key
    attribute is dependent on only part of the
    primary key.

10
Relations in Second Normal Form (2NF)
Changes to customer names have to be made on
each line on which the customer appears.
11
Relations in Second Normal Form (2NF)
Inconsistent data could result when the same
customer has several name variations.
12
Relations in Second Normal Form (2NF)
New customers can not be added unless there is an
existing transaction for the customer.
13
Relations in Second Normal Form (2NF)
Deletion of an invoice could result in the loss
of customer information.
14
Third Normal Form (3NF)
  • A relation is in third normal form if it is in
    second normal form and there are no transitive
    dependencies. A transitive dependency occurs
    when a table has a non-key attribute that is
    dependent on another non-key attribute.

15
Relations in Third Normal Form (3NF)
16
Table Relationships
1-M Relationship
REVENUE TRANSACTIONS
CUSTOMER ACCOUNTS
Invoice
Customer
Transaction Date
Customer
Customer Name
Foreign Key
M-N Relationship
REVENUE TRANSACTIONS
SERVICES
Customer
Invoice
Transaction Date
Service Type
Service Name
Hourly Rate
1
1
Bridge Table
REVENUE TRANSACTION LINES
M
M
Invoice
Hours
Service Type
17
Success!
About PowerShow.com