Professional Documents
Culture Documents
Management
A database is a integrated computer
Interaction between End User structure that house a collection of
and Database • Raw data
• Metadata (data about the data)
Database Management
System is a software
that allows you to
create, access and
manage a database
DBMS & People
Business Operations
Application (Data collection and transaction
Programs processing)
Analyst/Programmer
Users
Database
(Report, Ad hoc queries, and
Database Administrator analysis)
Database
records
fields
Projection:
Retrieve data from
columns (fields)
Selection:
Retrieve data from
Join: certain rows (records)
Combine the data from
two more tables using a
common column.
Maintaining Data
The process that keep data current and valid
• Adding Recodes
• Changing Records
• Deleting Records
• Data Validation
Elements of DBMS
1. Data Dictionary
Fields in
Customer file
Attributes about
State field
Elements of DBMS
SQL
2. Query Language
SQL: SELECT CID, Name, Phone, City, AccountBalance
FROM Customers
WHERE AccountBalance > 200 ;
Repeating Section
RentalForm
TransID RentDate CustomerID LastName Phone Address …. VideoID Copy# Title Rent
1 4/18/04 3 Washington 502-777-7575 95 Easy Street 1 2 2001: A Space Odyssey $1.50
1 4/18/04 3 Washington 502-777-7575 95 Easy Street 6 3 Clockwork Orange $1.50
2 4/30/04 7 Lasater 615-888-4474 67 S. Ray Drive 8 1 Hopscotch $1.50
2 4/30/04 7 Lasater 615-888-4474 67 S. Ray Drive 2 1 Apocalypse Now $2.00
2 4/30/04 7 Lasater 615-888-4474 67 S. Ray Drive 6 1 Clockwork Orange $1.50
3 4/18/04 8 Jones 615-452-1162 867 Lakeside Drive 9 1 Luggage Of The Gods $2.50
3 4/18/04 8 Jones 615-452-1162 867 Lakeside Drive 15 1 Fabulous Baker Boys $2.00
3 4/18/04 8 Jones 615-452-1162 867 Lakeside Drive 4 1 Boy And His Dog $2.50
4 4/18/04 3 Washington 502-777-7575 95 Easy Street 3 1 Blues Brothers $2.00
4 4/18/04 3 Washington 502-777-7575 95 Easy Street 8 1 Hopscotch $1.50
4 4/18/04 3 Washington 502-777-7575 95 Easy Street 13 1 Surf Nazis Must Die $2.50
4 4/18/04 3 Washington 502-777-7575 95 Easy Street 17 1 Witches of Eastwick $2.00
TransID RentDate CustomerID LastName Phone Address …. VideoID Copy# Title Rent
1 4/18/04 3 Washington 502-777-7575 95 Easy Street 1 2 2001: A Space Odyssey $1.50
6 3 Clockwork Orange $1.50
2 4/30/04 7 Lasater 615-888-4474 67 S. Ray Drive 8 1 Hopscotch $1.50
1NF Definition 2
6
1
1
Apocalypse Now
Clockwork Orange
$2.00
$1.50
3 4/18/04 8 Jones 615-452-1162 867 Lakeside Drive 9 1 Luggage Of The Gods $2.50
15 1 Fabulous Baker Boys $2.00
The first normal form (1NF) describe the table format in which 4 1 Boy And His Dog $2.50
4
•4/18/04
All the3 Washington 502-777-7575 95 Easy Street
key attributes are defined. 3
8
1
1
Blues Brothers
Hopscotch
$2.00
$1.50
• There are no repeating groups in the table. In other words, each row/column
13
17
1
1
Surf Nazis Must Die
Witches of Eastwick
$2.50
$2.00
intersection can contain one and only one value, rather than a set of values.
• All attributes are dependent on the primary key
Database Design: Normalization
RentalForm2(TransID, RentDate, CustomerID, Phone, Name, Address, City, State, ZipCode)
RentalForm2
TransID RentDate CustomerID Phone LastName FirstName Address City State ZipCode
1 4/18/04 3 502-777-7575 Washington Elroy 95 Easy Street Smith's Grove KY 42171
2 4/30/04 7 615-888-4474 Lasater Les 67 S. Ray Drive Portland TN 37148
3 4/18/04 8 615-452-1162 Jones Charlie 867 Lakeside Drive Castalian Springs TN 37031
4 4/18/04 3 502-777-7575 Washington Elroy 95 Easy Street Smith's Grove KY 42171
RentalForm2
TransID RentDate CustomerID Phone LastName FirstName Address City State ZipCode
1 4/18/04 3 502-777-7575 Washington Elroy 95 Easy Street Smith's Grove KY 42171
2 4/30/04 7 615-888-4474 Lasater Les 67 S. Ray Drive Portland TN 37148
3 4/18/04 8 615-452-1162 Jones Charlie 867 Lakeside Drive Castalian Springs TN 37031
4 4/18/04 3 502-777-7575 Washington Elroy 95 Easy Street Smith's Grove KY 42171
3NF Definition
3. It is in 2NF
And
2. It contains no transitive
dependencies
Database Design: Normalization
Rentals
ansID RentDate CustomerID
4/18/04 3
4/30/04 7
4/18/04 8
4/18/04 3
Data access
Extract Data
Historical &
and Warehouse
data analysis tools
transform
tools