lecture # 3 & 4

29
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1

Upload: charissa-boone

Post on 31-Dec-2015

22 views

Category:

Documents


4 download

DESCRIPTION

Lecture # 3 & 4. Chapter # 2 Database System Concepts and Architecture. Muhammad Emran Database Systems. Elements of the Database Approach. Enterprise Data Model Graphical model showing high-level entities and relationships for the organization Relational Databases - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Lecture # 3 & 4

Lecture # 3 & 4

Chapter # 2

Database System Concepts and Architecture

Muhammad EmranDatabase Systems

1

Page 2: Lecture # 3 & 4

Elements of the Database Approach Enterprise Data Model

Graphical model showing high-level entities and relationships for the organization

Relational Databases Database technology involving tables (relations) representing

entities and primary/foreign keys representing relationships Use of Internet Technology

Networks and telecommunications, distributed databases, client-server and 3-tier architectures

Database Applications Application programs used to perform database activities

(create, read, update, and delete) for database users

2

Page 3: Lecture # 3 & 4

3

Page 4: Lecture # 3 & 4

One customer may place many orders, but each order is placed by a single customer

One-to-many relationship

4

Page 5: Lecture # 3 & 4

One order has many order lines; each order line is associated with a single order

One-to-many relationship

5

Page 6: Lecture # 3 & 4

One product can be in many order lines, each order line refers to a single product

One-to-many relationship

6

Page 7: Lecture # 3 & 4

Therefore, one order involves many products and one product is involved in many orders

Many-to-many relationship

7

Page 8: Lecture # 3 & 4

Relationships established in special columns that provide links between tables

8

Page 9: Lecture # 3 & 4

Database Management System (DBMS) A software system that enables users to

define, create, maintain, and control access to the database.

(Database) application program: a computer program (written in any high level language) that interacts with database by issuing an appropriate request (SQL statement) to the DBMS.

9

Page 10: Lecture # 3 & 4

Database Management System (DBMS)

10

Page 11: Lecture # 3 & 4

Database Approach

Data definition language (DDL). Permits specification of data types, structures and any

data constraints. All specifications are stored in the database.

Data manipulation language (DML). General enquiry facility (query language) of the data.

11

Page 12: Lecture # 3 & 4

Database Approach

Controlled access to database may include: a security system an integrity system a concurrency control system a recovery control system a user-accessible catalogue

12

Page 13: Lecture # 3 & 4

Views Allows each user to have his or her own

view of the database.

A view is essentially some subset of the database.

13

Page 14: Lecture # 3 & 4

Views - Benefits Reduce complexity Provide a level of security Provide a mechanism to customize the

appearance of the database Present a consistent, unchanging picture of

the structure of the database, even if the underlying database is changed

14

Page 15: Lecture # 3 & 4

Components of DBMS Environment

15

Page 16: Lecture # 3 & 4

Components of DBMS Environment Hardware

Can range from a PC to a network of computers. Software

DBMS, operating system, network software (if necessary) and also the application programs.

Data Used by the organization and a description of

this data called the schema.

16

Page 17: Lecture # 3 & 4

Components of DBMS Environment

Procedures Instructions and rules that should be applied to the

design and use of the database and DBMS.

People Who uses the database with different views

17

Page 18: Lecture # 3 & 4

Components of Database Management System (DBMS)

18

Page 19: Lecture # 3 & 4

DBMS Architecture

19

Page 20: Lecture # 3 & 4

DBMS Architecture

The Internal or Physical Level: The collection of files permanently stored on

secondary storage devices. And it provides a low-level description of the physical

database, and an interface between the operating system's file system and the record structures used in higher levels of abstraction.

At this level record types and methods of storage are defined, as well as how stored fields are represented.

20

Page 21: Lecture # 3 & 4

DBMS Architecture

The Conceptual Level: It presents a logical view of the entire database, which

allows you to bring all the data in the database together and see it in a consistent manner.

The first stage in the design of a database is to define the conceptual view, and a DBMS provides a data definition language DDL for this purpose.

The data definition language used to create the conceptual level must not specify any physical storage considerations that should be handled by the physical level. It should not provide any storage or access details, but should define the information content only.

21

Page 22: Lecture # 3 & 4

DBMS Architecture

The External or View Level: It provides a window on the conceptual view which

allows the user to see only the data of interest to them.

The user can be either an applicationapplication program or an end useruser. Any number of external views can be defined and they can overlap each other.

The System Administrator and the DBA are special cases. Because they have responsibilities for the design and maintenance for the design and maintenance of the database, they at times need to be able to see the entire database. The external and the conceptual view are functionally equivalent for these two users.

22

Page 23: Lecture # 3 & 4

Roles in the Database Environment

Data Administrator (DA) Database Administrator (DBA) Database Designers (Logical and

Physical) Application Programmers End Users (naive and sophisticated)

23

Page 24: Lecture # 3 & 4

History of Database Systems

First-generation Hierarchical and Network

Second generation Relational

Third generation Object-Relational Object-Oriented

24

Page 25: Lecture # 3 & 4

DBs Hierarchical 1960s The hierarchical data model organizes

data in a tree structure. There is a hierarchy of parent and child

data segments. This structure implies that a record can

have repeating information, generally in the child data segments.

Data in a series of records, which have a set of field values attached to it. It collects all the instances of a specific record together as a record type.

These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows.

To create links between these record types, the hierarchical model uses Parent Child Relationships. These are a 1:N1:N mapping between record types. This is done by using trees,

25

Page 26: Lecture # 3 & 4

DBs Network 1970sData were more naturally modeled Data were more naturally modeled with more than one parent per child. with more than one parent per child.

So, the network model permitted the So, the network model permitted the modeling of many-to-many modeling of many-to-many relationships in datarelationships in data

The basic data modeling construct in The basic data modeling construct in the network model is the set construct. the network model is the set construct.

A set consists of an owner record A set consists of an owner record type, a set name, and a member record type, a set name, and a member record type. A member record type can have type. A member record type can have that role in more than one setthat role in more than one set

26

Page 27: Lecture # 3 & 4

Advantages of DBMSs

Control of data redundancy Data consistency More information from the same amount of data Sharing of data Improved data integrity Improved security Enforcement of standards Economy of scale

27

Page 28: Lecture # 3 & 4

Advantages of DBMSs Balance conflicting requirements Improved data accessibility and responsiveness Increased productivity Improved maintenance through data

independence Increased concurrency Improved backup and recovery services

28

Page 29: Lecture # 3 & 4

Disadvantages of DBMSs

Complexity Size Cost of DBMS Additional hardware costs Cost of conversion Performance Higher impact of a failure

29