Introduction To Database Systems
Introduction To Database Systems
Text Books :
1. Elmasri and Navathe , Fundamentals of Database
System, 4th edition. (UNITS-1,2,3 and 4)
Reference Book:
1. Silberschatz , Korth and Sudharshan , Database System
Concepts, 4th edition
Contents
UNIT - I
1. Introduction to database systems
2. Entity – Relationship Model
UNIT - II
3. Relational Model and Relational Algebra
UNIT – III
4. SQL – The Relational Database Standard
UNIT – IV
5. Database Design
UNIT – V
6.Transaciton Management
1.1 Introduction to the
database system
Topics to be discussed
1. Introduction
2. Characteristics of the Database approach
3. Actors on the scene
4. Advantages of using the DBMS approach
5. Data Models
6. Schemas and Instances
7. Three Schema Architecture and Data Independence
1.1 Introduction
-Databases and Database system have become an
essential component of everyday life in our society.
Database Properties :
1. represents some aspects of the real world (mini world ).
- Other functions :
• Protection (system protection and security protection)
• maintaining (allowing the system to evolve)
Database System
• The database and DBMS are together called database system
An Example : A UNIVERSITY database
1.2 Characteristics of Database Approach.
(File processing Vs database Approach)
For example,
– An application program written in c++ may have struct or class
declarations,
• program-data independence.
• In Database approach, the structure of the data files is stored in the DBMS
catalog separately from the program access. So changes to data file do not
require the changes to the program. This Property is called program-data
independence.
For Example : Adding another column to student file , say the BirthDate
You just need to change the description of STUDENT records in the
catalog. You need not change the your program
1.2 Characteristics of Database Approach.
Insulation between Programs and Data, and Data Abstraction :
• Data Abstraction
data
• Hides the details of how the data is stored or how the operations are
implemented.
1.2 Characteristics of Database Approach.
Insulation between Programs and Data, and Data Abstraction :
• Data Abstraction
A typical database user is not concerned with the location of each data
item within a record or its length
1.2 Characteristics of Database Approach .
Support of multiple views of data
• A multi-user DBMS must provide facilities for defining multiple
views for a variety of users.
• A view may be a subset of the database or it may contain virtual
data
• The People whose jobs involve the day-to-day use of large database.
1. Database Administrators (DBA) :
• Responsible for administering the database and DBMS software .
• Responsible for authorizing access to the database.
• Acquiring software and hardware resources as needed.
• Accountable for problems such as security and poor system response time.
2. Database designers :
• Responsible for identifying the data to be stored in the database
• Choosing appropriate structures to represent and store this data.
• Understanding and collecting user requirements and to come up with desired
design
• Interacting with each potential group of users to develop views of the database.
1.4 Actors on the Scene
• The People whose jobs involve the day-to-day use of large database.
3. End Users : End users access the database for querying , updating and generating
reports.
• The People whose jobs involve the day-to-day use of large database.
3. End Users : End users access the database for querying , updating and generating
reports.
• The People whose jobs involve the day-to-day use of large database.
4. Software Engineers (System analysts and Application Programmers)
programs .Then they test ,debug , document and maintain these canned
transaction.
1.6 Advantages of using the DBMS Approach
• Controlling Redundancy
• Restricting Unauthorized access
• Proving Persistent storage for Program objects
• Providing Storage Structures for efficient Query Processing
• Providing backup and Recovery.
• Providing multiple user interfaces
• Representing Complex Relationships among data
• Enforcing Integrity Constraints
• Permitting Interfacing and Actions using rules
• Additional advantages
1.6 Advantages of using the DBMS Approach
1. Controlling Redundancy
Problems of redundancy :
1. Controlling Redundancy
1. Controlling Redundancy
– Inconsistent record.
processing .
memory.
1. Simple
2. complex type
3. Uniqueness constraints
- Register number of a student must be unique
• Flexibility
- allow certain types of evolutionary changes to the structure of the
database without affecting the stored data and the existing
application programs.
1.6 Advantages of using the DBMS Approach
• Economics of scale
- permits consolidation of data and applications
- reduces the amount of wasteful overlap between activities of
data processing personnel
- enables the whole organization to invest in more powerful
processors, storage devices, or communication gear
2.1 Data Models , Schemas
and Instances
Data models :
• Data abstraction
– Fundamental characteristic of Database approach
– Provided by hiding the details of data storage.
• A Data Model
– Provides means to achieve this abstraction.
– a collection of concepts that can be used to describe
the structure of database.
Data models :
• Data items
• Some constraints
Database Schemas
1. Internal level
Describes the physical storage of the structure
Uses physical data model to describe internal schema
Describes complete details of data storage and access paths for
the database.
2. Conceptual level
Describes entities , data types , relationships , user operations
and constraints.
Uses representational data model to describe the conceptual
schema.
Hides details of physical storage
3. External (view) level
Describes a part of the database that a particular user group is
interested and hides rest of the database.
Uses representational model to describe each external schema
2.2 Three Schema Architecture - Example
Conceptual level or Conceptual schema :
Students(sid: string, name: string, login: string, age: integer, gpa:real)
Courses(cid: string, cname:string, credits:integer)
Enrolled(sid:string, cid:string, grade:string)