Introduction to Database Management Systems


Published on

1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Introduction to Database Management Systems

  1. 1. Introduction to Database Management Systems
  2. 2. Chapter 1: Introduction <ul><li>Evolution of Database Management Systems </li></ul><ul><li>Overview of Database Management Systems </li></ul><ul><li>Database-System Design </li></ul>
  3. 3. Database Management System (DBMS) <ul><li>Databases touch all aspects of our lives </li></ul><ul><li>DBMS: </li></ul><ul><ul><li>Collection of interrelated data </li></ul></ul><ul><ul><li>Set of programs to access the data </li></ul></ul><ul><li>Convenient and efficient processing of data </li></ul><ul><li>Database Applications </li></ul>
  4. 4. Evolution of Database Systems <ul><li>Early days: database applications built on top of file systems </li></ul><ul><li>Drawbacks of using file systems to store data: </li></ul><ul><ul><li>Data redundancy and inconsistency </li></ul></ul><ul><ul><li>Difficulty in accessing data </li></ul></ul><ul><ul><li>Atomicity of updates </li></ul></ul><ul><ul><li>Concurrency control </li></ul></ul><ul><ul><li>Security </li></ul></ul><ul><ul><li>Data isolation — multiple files and formats </li></ul></ul><ul><ul><li>Integrity problems </li></ul></ul>
  5. 5. Abstraction <ul><li>View level : application programs hide details of data types. </li></ul><ul><li>Logical level : what data are </li></ul><ul><li>type employee = record name : string; address : string; s alary : real; end ; </li></ul><ul><li>Physical level : how data are stored </li></ul>
  6. 6. Data Models <ul><li>A collection of tools for describing </li></ul><ul><ul><li>Data </li></ul></ul><ul><ul><li>Relationships among data items </li></ul></ul><ul><ul><li>Semantics of stored data </li></ul></ul><ul><ul><li>Database constraints </li></ul></ul>
  7. 7. Data Models <ul><li>Entity-Relationship model </li></ul><ul><li>Relational model </li></ul><ul><li>Other models: </li></ul><ul><ul><li>Network </li></ul></ul><ul><ul><li>Hierarchical </li></ul></ul><ul><ul><li>Object-oriented </li></ul></ul><ul><ul><li>Semi-structured </li></ul></ul>
  8. 8. Database Management Systems <ul><li>Smaller and smaller systems </li></ul><ul><ul><li>Past: large and expensive DBMS </li></ul></ul><ul><ul><li>Present: DBMS in most personal computers </li></ul></ul><ul><li>More and more data stored </li></ul><ul><ul><li>Past: few MB </li></ul></ul><ul><ul><li>Present: terabyte (10 12 bytes), petabyte (10 15 bytes) </li></ul></ul>
  9. 9. Application Architectures Two-tier architecture Three-tier architecture
  10. 10. Database Users <ul><li>Users are differentiated by the way they interact with the system </li></ul><ul><ul><ul><li>Database Administration : responsible for the structure or schema of the database (DDL), coordinates all activities regarding the database </li></ul></ul></ul><ul><ul><ul><li>Application programmers – interact with system through DML calls </li></ul></ul></ul><ul><ul><ul><li>Sophisticated users – form requests in a database query language </li></ul></ul></ul><ul><ul><ul><li>Naive users – invoke one of the permanent application programs that have been written previously </li></ul></ul></ul>
  11. 11. Data Definition Language (DDL) <ul><li>Defines the database schema and constraints </li></ul><ul><li>DDL compiler  data dictionary </li></ul><ul><li>Metadata – data about data </li></ul>
  12. 12. Data Manipulation Language (DML) <ul><li>Accessing and manipulating the data </li></ul><ul><ul><li>DML – query language </li></ul></ul><ul><li>Query Languages </li></ul><ul><ul><li>Procedural – user specifies what data is required and how to get those data </li></ul></ul><ul><ul><li>Nonprocedural – user specifies what data is required without specifying how to get those data </li></ul></ul><ul><li>SQL: nonprocedural query language </li></ul>
  13. 13. Transaction Management <ul><li>T ransaction : unit of work to be executed atomically and in isolation from other transactions </li></ul><ul><li>Transaction-manager : ensures that the database remains in a consistent </li></ul><ul><ul><li>system failures </li></ul></ul><ul><ul><li>transaction failures </li></ul></ul><ul><li>Concurrency-control : interaction among the concurrent transactions to ensure consistency </li></ul>
  14. 14. ACID Properties <ul><li>A tomicity: all-or-nothing of the transaction’s effect will take place </li></ul><ul><li>C onsistency: each transaction leaves the system in a consistent state </li></ul><ul><li>I solation: each transaction must appear to be executed as if no other transactions are executed at the same time </li></ul><ul><li>D urability: effect of a transaction must never be lost after the transaction is completed </li></ul>
  15. 15. Transaction Processing <ul><li>Logging: </li></ul><ul><ul><li>Log manager </li></ul></ul><ul><ul><li>Recovery manager </li></ul></ul><ul><li>Concurrency control </li></ul><ul><ul><li>Multiple transactions </li></ul></ul><ul><ul><li>Locking protocols </li></ul></ul><ul><li>Deadlock resolution </li></ul>
  16. 16. Database System Studies <ul><li>Design of the database </li></ul><ul><ul><li>What to store, structure, semantics </li></ul></ul><ul><ul><li>Functionality requirement </li></ul></ul><ul><ul><li>Trade offs </li></ul></ul><ul><ul><li>Security </li></ul></ul><ul><li>Database programming </li></ul><ul><ul><li>How to express database operations, capability requirements, etc. </li></ul></ul><ul><li>Database implementation </li></ul><ul><ul><li>Query, transaction processing, storage, efficiency </li></ul></ul>
  17. 17. Next Class: Entity Relationship Model (Cont.) <ul><li>E-R model of real world </li></ul><ul><ul><li>Entities (objects) </li></ul></ul><ul><ul><li>Attributes of entities </li></ul></ul><ul><ul><li>Relationships between entities </li></ul></ul><ul><li>Widely used for database design </li></ul><ul><ul><li>E-R model usually converted to design in the relational model </li></ul></ul>