Professional Documents
Culture Documents
Chapter 1: Introduction
Purpose of Database Systems Database Languages Relational Databases Database Design Data Models Database Internals Database Users and dministrators !"erall Structure #istory of Database Systems
Le"els of bstraction
Physical level: describes ho+ a record $e.g.( customer& is stored. Logical level: describes data stored in database( and the relationships among the data. type customer 6 record customer_id : string7 customer_name : string7 customer8street : string7 customer_city : string7 end7 View level: application programs hide details of data types. 9ie+s can also hide information $such as an employee:s salary& for security purposes.
9ie+ of Data
An architecture for a database system
Physical Data Independence ; the ability to modify the physical schema +ithout changing the logical schema pplications depend on the logical schema
In general( the interfaces bet+een the "arious le"els and components should be +ell defined so that changes in some parts do not seriously influence others.
Data Models
#ierarchical model
,et+or' model Relational model
d"antages
Disad"antages
Implementation comple*ity Lac' of structural independency Implementation limitations Program comple*ity
,et+or'
,et+or' model replaces the hierarchical tree +ith a graph ble to handle different relations !peration :<
Insert Update Dalete Retrie"al
ad"antages
Capable to handle different relationships 4ase in data access Data integrity Database standards Data independence
disad"antages
System comple*ity !perational anomalies bsence of structural independence
Relational Model
4*ample of tabular data in the relational model
Attributes
S@L
SQL: +idely used non<procedural language 4*ample: 3ind the name of the customer +ith customer<id 1AB<CD<EFGH select customer.customer_name from customer where customer.customer_id 6 I1AB<CD<EFGH: 4*ample: 3ind the balances of all accounts held by the customer +ith customer<id 1AB<CD<EFGH select account.balance from depositor( account where depositor.customer_id 6 I1AB<CD<EFGH: and depositor.account_number = account.account_number pplication programs generally access databases through one of Language e*tensions to allo+ embedded S@L pplication program interface $e.g.( !D%CJKD%C& +hich allo+ S@L ?ueries to be sent to a database
Database Design
5he process of designing the general structure of the database: Logical Design ; Deciding on the database schema. Database design re?uires that +e find a 1good2 collection of relation schemas. %usiness decision ; Mhat attributes should +e record in the databaseN Computer Science decision ; Mhat relation schemas should +e ha"e and ho+ should the attributes be distributed among the "arious relation schemasN Physical Design ; Deciding on the physical layout of the database
Data Independence
the ability to modify the schema +ithout changing the other schema In general( the interfaces bet+een the "arious le"els and components should be +ell defined so that changes in some parts do not seriously influence others.
(web browser)
Old
Modern
Storage Management
Storage manager is a program module that pro"ides the interface bet+een the lo+<le"el data stored in the database and the application programs and ?ueries submitted to the system. 5he storage manager is responsible to the follo+ing tas's: Interaction +ith the file manager 4fficient storing( retrie"ing and updating of data Issues: Storage access 3ile organi)ation Inde*ing and hashing
@uery Processing
1. Parsing and translation B. !ptimi)ation D. 4"aluation
5ransaction Management
transaction is a collection of operations that performs a single logical function in a database application ransaction!management component ensures that the database remains in a consistent $correct& state despite system failures $e.g.( po+er failures and operating system crashes& and transaction failures. "oncurrency!control manager controls the interaction among the concurrent transactions( to ensure the consistency of the database.
#istory $cont.&
1AC0s: Research relational prototypes e"ol"e into commercial systems S@L becomes industry standard Parallel and distributed database systems !b=ect<oriented database systems 1AA0s: Large decision support and data<mining applications Large multi<terabyte data +arehouses 4mergence of Meb commerce B000s: LML and L@uery standards utomated database administration Increasing use of highly parallel database systems
Database Users
#sers are differentiated by the +ay they e*pect to interact +ith the system $pplication programmers ; interact +ith system through DML calls Sophisticated users ; form re?uests in a database ?uery language Speciali%ed users ; +rite speciali)ed database applications that do not fit into the traditional data processing frame+or' &a've users ; in"o'e one of the permanent application programs that ha"e been +ritten pre"iously 4*amples( people accessing database o"er the +eb( ban' tellers( clerical staff
Database dministrator
Coordinates all the acti"ities of the database system has a good understanding of the enterprise:s information resources and needs. Database administratorOs duties include: Storage structure and access method definition Pranting users authority to access the database %ac'ing up data Monitoring performance and responding to changes Database tuning
Database rchitecture
5he architecture of a database systems is greatly influenced by the underlying computer system on +hich the database is running: Centrali)ed Client<ser"er Parallel $multiple processors and dis's& Distributed
3igure 1.F
3igure 1.E