01 Chapter

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 49

1

Course Name
Database System Design, Implementation, and Management Teacher: Engr. Mahmood Ur Rehman Khilji
BS(CE) BUITEMS

Recommended and Reference Books


Database System, Design, Implementation & Management 5th Edition (Recommended) By Rob & Coronel Databases System (Reference) By Katherin Ricardo Introduction to Oracle9i: SQL/PLSQL Form Designing Student Guide Vol1 & 2

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.

Database and Database Application Design


Database design using entity-relationship and semantic object models, database application design. Terminology in Relational Data Model, Keys, Integrity Constraints, Primitive Operations on Relations, Relational Algebra (RA), Relational Algebra Operations, Relational Completeness, Additional Operations on Relations.
5

Course Description (Cont)


Database Implementation
Foundations of relational implementation. Structured Query Language (SQL): DML Features in SQL, DDL in SQL, Updates in SQL, Views in SQL, Embedded SQL, Query-by-Example (QBE). Transaction, Concurrency, Recovery and Security Issues.

Normalization
Amstrongs Inference Rules and Minimum Covers, Normal Forms: First Normal Form, Second Normal Form, Third Normal Form, Boyce-Codd Normal Form

Chapter 1 File Systems and Databases


Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel

In this chapter, you will learn:


What a database is, what it does, and why database design is important How modern databases evolved from files and file systems About flaws in file system data management What a DBMS is, what it does, and how it fits into the database system About types of database systems and database models
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Introducing the Database


Data versus Information
Data constitute building blocks of information Information produced by processing data Information reveals meaning of data Good, timely, relevant information key to decision making Good decision making key to organizational survival

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

Database: What is it?


A database is an organized collection of logically related data Data are facts, text, graphics, images, sound, and video segments that have meaning in the users environment Database skills enable IT professionals to know which data are logically related and how best to organize them Organized to achieve what purpose? Related in what way? By organization we mean the data are structured so as to be easily stored, manipulated and retrieved. By related we mean the data describe a domain of interest to answer questions concerning the domain.
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

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

Data Item Name Type Course Char

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

Database Management System (DBMS)


A DBMS (database management system) is a software system used to create, maintain, and provide controlled access to use databases A DBMS is a data storage and retrieval system which permits data to be stored non-redundantly while making it appear to the user as if the data is well-integrated. Importance Makes data management more efficient and effective
Query language allows quick answers to ad hoc queries Provides better access to more and better-managed data Promotes integrated view of organizations operations Reduces the probability of inconsistent data
Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

15

Database Management System


Application #1

Application #2

DBMS
DBMS manages data resources like an operating system manages hardware resources

Database containing centralized shared data

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

Old (Traditional File System Approach) Vs New (Database Approach)


Traditional file processing
Duplication of data Limited data sharing Lengthy development time Excessive program maintenance A lot of experienced Programmers and developers Database technology Minimal data redundancy

Improved data consistency, quality, accessibility, and sharing Increased productivity and less maintenance

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

18

Database vs File Systems


FILE SYSTEM Program 1 Meta-Data

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

Three file processing systems at Pine Valley Furniture Duplicate Data

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

Simple File System

Figure 1.5

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

22

File System Critique


File System Data Management
Requires extensive programming in thirdgeneration language (3GL) Time consuming Makes ad hoc queries impossible Administration and Data Modification is difficult Data inconsistency

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

23

File System Critique (cont.)

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

Must tell program what to do and how


Difference b/w the data logical format and data physical format

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

File System Critique (cont.)

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 vs. File Systems


Figure 1.6

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

27

1 Database System Environment


Hardware Software Operating System DBMS Application Programs People System administrator Database administrators Database designers Programmer End Users Procedures Data

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

28

Database System Environment

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

29

Database System Types


Single-user vs. Multi-user Database
Desktop Workgroup Enterprise

Centralized vs. Distributed

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 Models (cont.)


Relationships in Conceptual Models
One-to-one (1:1) One-to-many (1:M) Many-to-many (M:N)

Implementation Database Models


Hierarchical Network Relational

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

33

Hierarchical Database Model


Logically represented by an upside down tree
Each parent can have many children Each child has only one parent

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

34

Traversing in Hierarchical Model


Traversing path for Part D (Preorder Technique) Final Assembly Component A Assembly A Part A Part B Part C Part D For efficient data access for Part D place component C on left side of level 1 segment then path will be Final Assembly Component C Assembly B Part D Hierarchical Model is suitable for 1:M relationship e.g. Bank customer account
35

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

Hierarchical Database Model


Advantages
Conceptual simplicity Database security and integrity Efficiency

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

Network Database Model


Each record can have multiple parents
Composed of sets Each set has owner record and member record Member may have several owners

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

37

Network Database Model


Advantages
Conceptual simplicity Handles more relationship types Data access flexibility Promotes database integrity Data independence

Disadvantages
System complexity Lack of structural independence

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

38

Relational Database Model


Perceived by user as a collection of tables for data storage Tables are a series of row/column intersections Tables related by sharing common entity characteristic(s)

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

39

Relational Database Model (cont.)

Figure 1.11

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

40

Relational Database Model


Advantages
Structural independence Improved conceptual simplicity Easier database design, implementation, management, and use Ad hoc query capability with SQL Powerful database management system

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

41

Relational Database Model


Disadvantages
Substantial hardware and system software overhead Poor design and implementation is made easy

Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

42

Object-Oriented Database Model


Objects or abstractions of real-world entities are stored
Attributes describe properties Collection of similar objects is a class
Methods represent real world actions of classes Classes are organized in a class hierarchy

Inheritance is ability of object to inherit attributes and methods of classes above it

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

Overview of all Models


Entity Relationship

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?

You might also like