DATABASE MANAGEMENT SYSTEM
TRADITIONAL FILE-BASED
SYSTEMS
A collection of application programs that perform services
for the end-users such as the production of reports. Each
program defines and manages its own data.
Figure 7-3
2
DATABASE MANAGEMENT SYSTEM
(DBMS)
• Software for creating and maintaining databases
• Permits firms to rationally manage data for the entire firm
• Acts as interface between application programs and physical data
files
• Separates logical and design views of data
• Solves many problems of the traditional data file approach
3
WHAT IS A DATABASE SYSTEM?
Database System = Database + DBMS
A Database is
A large, integrated collection of data
Models a real-world enterprise.
Entities (e.g., students, courses)
Relationships (e.g., Khan takes CS123)
A Database Management System (DBMS) is a software package
designed to store and manage databases easily and efficiently.
4
DATABASE MODEL
DATA MODELS
Hierarchical structure
Records are arranged in multilevel with one root and any number of
subordinate levels. Thus all relationships are one-to- many.
Network structure
Data can be accessed through many paths.
Relational structure
Data stored in the database in viewed the form of simple tables.
6
7
RELATIONAL DATABASE MODEL
(RDBMS)
Stores both
Data about real
world objects
(entities) in tables
Relationships
between the tables
RELATIONAL DATABASE
Fields (columns) in the
table store attributes.
Each attribute has a specific
domain.
Tuples (or records or rows)
in the table store
information.
Each tuple is a unique instance
of an object.
Tables are composed of a
set of tuples.
A table is also called a relation.
TERMS
Table
A collection of relevant data relating to one type of real world objects.
Column
A specific place for one type of data relating to one type of real world
objects.
Domain
Set of all possible values for a specific column.
Row
Collection of data describing one real world object.
Primary Key
Columns, which are part of the row and uniquely identify any one row.
Foreign Key
A foreign key is generally a primary key from one table that appears as a
field in another where the first table has a relationship to the second
10
RELATING TABLES
Primary key Foreign key Primary key
Student
Class
ID Last First Grade Class
1 Wood Bob C IST357 Name #Stud Instructor
IST357 48 Jones
2 Kent Chuck B IST115
IST115 120 Brower
3 Smith Jane A IST357
IST20 120 Mennis
4 Boone Dan B IST357
11
ADVANTAGES OF RDBMS
Eliminate unnecessary duplication of data
Enforce data integrity through constraints
Changes to conceptual schema need not affect
external schema
Changes to internal schema need not affect the
conceptual schema
Many tools are available to manage the database
12
DBMS IN PERSPECTIVE
DBMS Advantages
Reduce data redundancy.
Achieve data independence.
Retrieve data and information rapidly.
Improve security.
DBMS Disadvantages
Obtain expensive software.
Obtain a large hardware configuration.
Hire and maintain a DBA staff.
13