You are on page 1of 25

Database

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

(Design, create, and maintain) Database


Management
System

Users
Database
(Report, Ad hoc queries, and
Database Administrator analysis)

(Standards, Design, Control, and procedures)


Advantages of Database All Data Files

• Data Independence Database Management


System
• Reduced Data Redundancy Invoice Billing
Program Program
• Improved Data Integrity
• Shared Data
• Reduced Development Time and Maintenance Cost
• Easier Reporting
The Hierarchy of Data Key field Field name

Database
records

fields

Characteristics of Rating field


Relational Database Structure
Database
Operations

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 ;

Query By Example Criteria


Elements of DBMS

3. Data Entry Form


Elements of DBMS
4. Report Generator
Elements of DBMS

5. Database Administration Tools


• Security
• maintenance
• Backup and Recovery
Database Design Process View Constraints
A student can take up to
Student six classes per registration
Student
Degree ofProfessor
Registration
Student Characteristics
Course
course Class Room
Abstraction 1
Enroll
Conceptual
Model Entities
Hardware-independent,
High generates
Class A class is limited to 35
software-independent
students
M
Student1 ID Mto
Internal Social security number M M A room may be used
External Class Scheduling Room teach many classes; each
Model First
Professorname
Medium teaches contains
Hardware-independent,
Class Student
Model class is taught in only one
Last name software-dependent
room
Middle initial Requires
M
Sex Student
Physical Data of birth attributes
A class is taught by one
Hardware-dependent,
Home Address Class
requires
Model Low professor
software-dependent
Home phone
Major
Hours completed
Grade point average 1 Taught by
Room

A professor may teach up


Professor to three classes
Database Design: Normalization
A process for assigning attributes to entities and reduces
data redundancies.
Database Design: Normalization
RentalForm(TransID, RentDate, CustomerID, Name, Phone, Address, City, State, ZipCode, (VideoID, Copy#, Title, Rent ) )

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

RentalLine(TransID, VideoID, Copy#, Title, Rent )


RentalLine
TransID VideoID Copy# Title Rent
1 1 2 2001: A Space Odyssey $1.50
2NF Definition
1 6 3 Clockwork Orange $1.50
2 8 1 Hopscotch $1.50
2 2 1 Apocalypse Now $2.00 A table is in 2NF if:
2 6 1 Clockwork Orange $1.50
3 9 1 Luggage Of The Gods $2.50
3 15 1 Fabulous Baker Boys $2.00 • It is in 1NF
3 4 1 Boy And His Dog $2.50
4 3 1 Blues Brothers $2.00
4 8 1 Hopscotch $1.50 And
4 13 1 Surf Nazis Must Die $2.50
4 17 1 Witches of Eastwick $2.00
• It includes no partial dependencies;
No duplication that is, no attribute is dependent on
only a portion of the primary key.
Database Design: Normalization

Videos(VideoID, Title, Rent )


VideosRented(TransID, VideoID, Copy# )
VideoID Title Rent
TransID VideoID Copy# 1 2001: A Space Odyssey $1.50
1 1 2 2 Apocalypse Now $2.00
1 6 3 3 Blues Brothers $2.00
2 2 1 4 Boy And His Dog $2.50
2 6 1 5 Brother From Another Planet $2.00
2 8 1 6 Clockwork Orange $1.50
3 4 1 7 Gods Must Be Crazy $2.00
3 9 1 8 Hopscotch $1.50
3 15 1
4 3 1
4 8 1
4 13 1
4 17 1

Column depends on entire (whole) 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

3NF Definition

A table is in 3NF if:

3. It is in 2NF

And

2. It contains no transitive
dependencies
Database Design: Normalization

Rentals(TransID, RentDate, CustomerID )

Rentals
ansID RentDate CustomerID
4/18/04 3
4/30/04 7
4/18/04 8
4/18/04 3

Customers(CustomerID, Phone, Name, Address, City, State, ZipCode )


Customers

Phone LastName FirstName Address City State ZipCode


2-666-7777 Johnson Martha 125 Main Street Alvaton KY 42122
2-888-6464 Smith Jack 873 Elm Street Bowling Green KY 42101
2-777-7575 Washington Elroy 95 Easy Street Smith's Grove KY 421
2-333-9494 Adams Samuel 746 Brown Drive Alvaton KY 42122
2-474-4746 Rabitz Victor 645 White Avenue Bowling Green KY 42102
5-373-4746 Steinmetz Susan 15 Speedway Drive Portland TN 37148
5-888-4474 Lasater Les 67 S. Ray DrivePortland TN 37148
5-452-1162 Jones Charlie 867 Lakeside Drive Castalian Springs TN 37031
2-222-4351 Chavez Juan 673 Industry Blvd. Caneyville KY 42721
2-444-2512 Rojo Maria 88 Main Street Cave City KY 42127
3NF Tables
Multidimensional Data Analysis
(Online Analytical Processing)
When decision-making involves more than three variables
(factors), We need multidimensional database to enables us
to view the data in different ways using multiple dimensions.
Data Warehouses
A database, with reporting and query tools, that stores
current and historical data extracted from various
operational systems and consolidated for management
reporting
Operational
and analysis.
data

Data access
Extract Data
Historical &
and Warehouse
data analysis tools
transform
tools

External • Queries and reports


data • Enterprise application integration
• Business intelligence
• E-business
• High-availability/data Resiliency
• CRM
• Datamining
Datamining
Analysis of large pools of data to find patterns and rules that
can be used to guide decision making and predict future
behavior.
KEY APPLICATIONS
In Finance
• Portfolio Construction and Optimization
• Risk Management and Budgeting
• Trading Strategies
• Predicting Volatility and Returns
• Pricing Complex Assets

You might also like