01 Chapter
01 Chapter
01 Chapter
Course Name
Database System Design, Implementation, and Management Teacher: Engr. Mahmood Ur Rehman Khilji
BS(CE) BUITEMS
Course Objective
To introduce concepts and types of Computer Database Examine theoretical and pragmatic ideas underlying relational databases Discuss certain other aspects of database systems recovery, concurrency, security, and integrity. Upon completion of this course, the students should be able to outline an architecture for a database system, define and manipulate data, and understands transactions process of database systems
4
Course Description
Introduction
Overview of Database Systems, Database Systems vs. File Systems, Various aspects of Database Systems, Terminology: model, schema, instance. Three levels of data abstraction, Database
Data Modeling
The Conceptual Model, Internal Model, External Model and Physical Model, Entity-Relationship (ER) Model, Entities and Entity types, Relationship and Relationship type, Constraints, Weak Entity Types, ER Diagrams. Semantic object model.
Normalization
Amstrongs Inference Rules and Minimum Covers, Normal Forms: First Normal Form, Second Normal Form, Third Normal Form, Boyce-Codd Normal Form
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Data in Context
Large volume of facts, difficult to interpret or make decisions based on
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
10
Summarized data
Useful information that managers can use for decision making and interpretation
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
11
12
Definitions
Metadata is data that describes the properties or characteristics of other data. Example: Description of a table structure Table ABC Column Name Data Type Length Description
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
13
Metadata
Descriptions of the properties or characteristics of the data, including data types, field sizes, allowable values, and documentation
Value Length Min Max Description 7 Three digit department reference and 4 digit course number Section Integer 3 001 900 Section number Semester Char 10 Semester and year Name Char 30 Student name Major Char 3 Student major
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
14
15
Application #2
DBMS
DBMS manages data resources like an operating system manages hardware resources
Application #3
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
16
The DBMS Manages the Interaction Between the End User and the Database
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
17
Improved data consistency, quality, accessibility, and sharing Increased productivity and less maintenance
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
18
Data
Program 2 Meta-Data Data Data Program 3 Meta-Data
Program 1
Program 2 Program 3
DATABASE MetaData
Data
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
19
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
20
File Terminology
Data
Raw Facts
Field
Group of characters with specific meaning
Record
Logically connected fields that describe a person, place, or thing
File
Collection of related records
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
21
Figure 1.5
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
22
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
23
Data Dependence
Change in files data characteristics requires modification of data access programs
e.g. Change a data type of a field from integer to fractional
Makes file systems cumbersome (awkward) from programming and data management views
Structural Dependence
Change in file structure requires modification of related programs
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
24
Data Redundancy
Different and conflicting versions of same data Results of uncontrolled data redundancy
Data anomalies
Modification Insertion Deletion
Data inconsistency
Lack of data integrity
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
25
Database Systems
Database consists of logically related data stored in a single repository Provides advantages over file system management approach
Eliminates inconsistency, data anomalies, data dependency, and structural dependency problems Stores data structures, relationships, and access paths
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
26
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
27
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
28
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
29
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
30
DBMS Functions
Data dictionary management Data storage management Security management Multi-user access control Backup and recovery management Data integrity management Database language and application programming interfaces Database communication interfaces
31
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Database Models
Collection of logical constructs used to represent data structure and relationships within the database
Conceptual models: logical nature of data representation Implementation models: emphasis on how the data are represented in the database
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
32
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
33
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
34
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Disadvantages
Complex implementation Difficult to manage and lack of standards Lacks structural independence Ad hoc queries are impossible Implementation limitations (M:N difficult)
36
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
37
Disadvantages
System complexity Lack of structural independence
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
38
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
39
Figure 1.11
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
40
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
41
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
42
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
43
OO Concepts 1
Attributes Age Gender Name . Associations myLeftArm myLeftLeg myRightArm ....
Methods/Operations Jump.. Talk... Dance Ask Friend Jump Walk Jump Shake myHead Shake myBody
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
44
OO Concepts 2
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
45
OO Data Model
Advantages
Database integrity Both structural and data independence
Disadvantages
Lack of OODM High system overhead slows transactions
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
46
Hierarchical Model
Network Model
Relational Model
Object Oriented
Easy to Understand ----------------------------------------------------Difficult to represent M:N relationship Physical level dependency No ad hoc queries Access path predefined -----------------------------------------------------Physical level dependency No ad hoc queries Access path predefined -----------------------------------------------------Provide ad hoc queries Easy to design Structural independent -----------------------------------------------------Support for complex objects Inheritance
47
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Key Terms
Ad hoc query Attribute Centralized DBMS Class Conceptual Model Data Data definition Language Data dependency Data dictionary Data inconsistency Data integrity Data manipulation language Data redundancy Database Database management system
Entity Entity relationship diagram Entity set Field File Hierarchical database model Inheritance Logical design Metadata Method Query Record Relationship Relational data model Structured query language
48
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel
Any Questions?