CSITDBMSUnit 1part 1
CSITDBMSUnit 1part 1
Database Systems
1
Database Management Systems
Introduction: Database System, Characteristics (Database Vs File System), Advantages of Database
Systems,
Database Applications, Database Users, Brief Introduction of Different Data Models; Concepts of
Schema,
Instance and Data Independence; Three Tier Schema Architecture for Data Independence;
Database System Structure, Centralized and Client Server Architecture for Database Systems.
Definition
Construction
Manipulation
4
File System: A Physical Interface
Student Year
Student Admin Lists
Data
Course Timetable
Scheduler
Data
Lecturer Money
Data Payroll
Transfer
5
Sharing Data:
Student
Admin
Teaching
Schedule
Payroll
6
Sharing Data and Operations
Student Admin
Student Data
Lab Timetable
Course Tutorials
Data
Scheduler
Teaching
Lecturer
Data
Schedule
Payroll
7
File System Approach
• Uncontrolled redundancy
• Inconsistent data
• Inflexibility
• Limited data sharing
• Poor enforcement of
standards
• Low programmer
productivity
• Excessive program
maintenance
• Excessive data maintenance 8
DBMS Approach
• Controlled • Services & controls
redundancy – security &
– consistency of privacy
data & integrity controls
constraints – backup &
• Integration of data recovery
– self-contained – enforcement
– represents of standards
semantics of • Flexibility
application – data
• Data and independenc
operation e
• Ease of
sharing – data 1
application 4
– multiple accessibility
development
interfaces –
If an application is • In a file system, data
• simple is physically accessed
• stringent real-time and not integrated
• single user
• static,
files are the option of
choice • In a DBMS, data is
logically accessed
and integrated:
– query language
– data dictionary
1
5
Limitations of File-based
Data isolation
Multiple files and formats
Integrity problems
Integrity constraints (e.g., account balance > 0) become
“buried” in program code rather than being stated explicitly
Hard to add new constraints or change existing ones
Drawbacks of using file systems to store data
Atomicity of updates
Failures may leave database in an inconsistent state with partial
updates carried out
Example: Transfer of funds from one account to another should
either complete or not happen at all
Security problems
Hard to provide user access to some, but not all, data
Database systems offer solutions to all the above
problems
DBMS vs FMS
DBMS vs FMS
Characteristics of the DB
Approach
• Insulation of application programs
and data from each other
New New
hardwar functions Change
e in use
New New
user Databas data
s e
User' Change
s Linkage to in
view other technolo
databases gy
New
• Logical storage
data independence
techniques
– change the logical schema without having to
change the external schemas
• Physical data independence
– change the internal schema without having to
change the logical schema
Database Management System
Facility
Control redundancy
Consistency
Integrity
Security
Concurrency control
Backup & recovery
Data standard
More information
Data sharing & conflict control
Productivity & accessibility
Economy of scale
Maintenance
Limitations of DBMS
Complexity
Size
Cost
Software
Hardware
Conversion
Performance
Vulnerability
Features of DBMS
1. Data storage, retrieval, and update: The ability to
store, retrieve, and update the data that are in
the database.
Passwords: Allows only authorized users to access the database. Access privileges
can be provided based on access needs
Views: Different snapshot of the data ensures that users only get access to data
they need
Integrity
Integrity Constraints are the conditions that
data must satisfy during initial input &
updates.
There are four categories of constraints
Data Type
Legal Values
Format
Key Constraints
2
9
Building an Application with a
DBMS
• Requirements gathering (natural language,
pictures)
• Requirements modeling (conceptual data model,
ER)
– Decide what entities should be part of the
application and how they should be related
• Schema design and implementation
– Decide on a set of tables, attributes
– Create the tables in the database system
– Populate database (insert records/tuples)
• Write application programs using the DBMS
– … a lot easier now that 3
1
the data management is taken care of
Database Management System
(DBMS)
DBMS contains information about a particular
enterprise
Collection of interrelated data
Set of programs to access the data
An environment that is both convenient and efficient to use
Database Applications:
Banking: transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Online retailers: order tracking, customized recommendations
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
Database Application
“on the
Designers Programmers scenes”
Database End Users
Administrator • sophisticated
• casual
(DBA) •‘parametric’ or
‘canned’ transactions
Database
Database
course Management Teaching
student System
Schedule
lecturer
Tutorials
Data Dictionary
or
System
Catalog
University
?QUERIES
Database
Metadata
33