89351dab6e1150139f10e014e898746c.ppt
- Количество слайдов: 27
Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore ii. WAS 2002, Bandung, Indonesia
Why Databases? ii. WAS 2002, Bandung, Indonesia
Persistence n How can data survive the process that created them, and be reused by other processes?
Persistence n n Main Memory is volatile Secondary or tertiary memory is persistent
Persistence Cache Main memory Flash memory Magnetic Disk Optical Disk Magnetic Tape Primary Volatile Secondary Persistent Tertiary Persistent
Large Amounts of Data n n How to manage large amounts of data? Issues: – Cost – Addressing – Speed
Large Amounts of Data Cache Main memory 32 bits/64 bits Flash memory Magnetic Disk Optical Disk Magnetic Tape SPEED CAPACITY per DOLLAR
Large Amounts of Data n n When data is to be stored on secondary or tertiary storage, then we need to devise efficient algorithms taking into account the dominant cost of Input/Output operations (I/Os) Such algorithms are called external algorithms (e. g. sort)
Homogeneous Data (The Good News!) n n n Collections of similar objects We can predict access patterns We can devise indexing and access methods for efficient storage, update, and retrieval
(Collections of) Structured Data n We can invent data models and design applications around the data by defining the application schema • record(last name: Smith, first name: Michael, ss#: 67534132) • difficult for multimedia data (text, video, sound, etc)
(Collections of) Structured Data n We can invent specialised languages for data definition and manipulation (COBOL, SQL) • CREATE TABLE employee (first_name char(32), last_name CHAR(32)) • SELECT last_name FROM employee WHERE first_name = ‘Michael’
Concurrent and Distributed Access n How can data be shared by users and processes that are possibly distributed over a network?
A Remark on Consistent States and Transactions n A Consistent State of the database is a state which complies with the business rules as usually defined by Integrity constraints – Example: “students who have not passed cs 2102 cannot take cs 3223”
A Remark on Consistent States and Transactions n A Transaction is a logical unit of work carried out by a user or an application for which we wish to ensure isolation and consistency
Concurrent Access n n n Concurrency Control: ACID Isolation: Transactions can be understood independently from each other Consistency: If individual transactions would leave the application in a consistent state, a concurrent execution should do the same
Sensitive Data: Integrity n How to guarantee and maintain the integrity of the data in spite of possible application, system, or media failures?
Sensitive Data: Integrity n The DBMS manages the recovery after failure guaranteeing durability and atomicity of the transactions
Sensitive Data: Integrity n Recovery: ACID – Atomicity: all actions in a transaction happen or none happen – Durability: effects of successful transactions last
Sensitive Data: Security n How to control the Access to the data?
Definitions n DCL: Database Control Language. It include statements to administer access privileges and transactions properties
In Summary n How to manage large amounts of persistent, homogeneous, and structured data that are shared among distributed users and processes and whose integrity must be maintained and whose security must be controlled?
Database Application n n A database application is a collection of data and the programs that allow the manipulation of these data A database application is usually implemented using a Data. Base Management System (DBMS)
Database Application: Examples n n n ATM banking University data managemen (Oracle) Airline reservations (Amadeus, Sabre) My address book (Microsoft Access) The e-shop around the corner (MSQL)
Data. Base Management System n A DBMS is a collection of software that facilitates the implementation and management of database applications
Data. Base Management System n Examples of Relational DBMS: – Access, Paradox, d. Base, Fox. Pro, Clipper – SQL Server, My. SQL – DB 2, Oracle, Sybase, Informix
DBMS (simplified) Architecture Data Control Language Statement Data Manipulation Language Statements Data Definition Language Statement Query Optimizer Query Evaluation Engine File and Access Methods Manager Recovery Manager Buffer Manager Storage manager I/O Manager Concurrency Control Manager
Introduction to Database Systems Mc. Graw. Hill Asian Customized Edition ISBN 007 -122664 -8 ii. WAS 2002, Bandung, Indonesia
89351dab6e1150139f10e014e898746c.ppt