Presentation is loading. Please wait.

Presentation is loading. Please wait.

10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components.

Similar presentations


Presentation on theme: "10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components."— Presentation transcript:

1 10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components of a DBMS Major Components of a DBMS Three Levels of Abstraction Three Levels of Abstraction

2 10/16/2015 2Yan Huang - Introduction What is a DBMS? DataBase Management System DataBase Management System A bunch of programs A bunch of programs Users use a language to ask questions about data that a DBMS manages Users use a language to ask questions about data that a DBMS manages DBMS understands the language and give answers as fast as possible DBMS understands the language and give answers as fast as possible

3 10/16/2015 3Yan Huang - Introduction History 1960s: network model (CODASYL) and hierarchical (IMS). 1960s: network model (CODASYL) and hierarchical (IMS). 1970: E.F. Codd’s seminal paper on relational model for databases 1970: E.F. Codd’s seminal paper on relational model for databases 1970s: 1970s: Ingres: Developed at UCB. This ultimately led to Ingres Corp., Sybase, MS SQL Server, Britton-Lee, Wang's PACE. Ingres: Developed at UCB. This ultimately led to Ingres Corp., Sybase, MS SQL Server, Britton-Lee, Wang's PACE. System R: Developed at IBM San Jose and led to IBM's SQL/DS & DB2, Oracle, HP's Allbase, Tandem's Non-Stop SQL. System R: Developed at IBM San Jose and led to IBM's SQL/DS & DB2, Oracle, HP's Allbase, Tandem's Non-Stop SQL. 1976: P. Chen proposed the Entity-Relationship (ER) model 1976: P. Chen proposed the Entity-Relationship (ER) model 1980s: Commercialization of RDBMS, Oracle was the first 1980s: Commercialization of RDBMS, Oracle was the first Early 1990s: OO databases Early 1990s: OO databases Mid-later 1990s: Web DB/data warehousing/data mining Mid-later 1990s: Web DB/data warehousing/data mining asp, Front Page, Java Servlets, jsp, JDBC, Enterprise Java Beans, ColdFusion, Dream Weaver, Oracle Developer 2000/OLAP asp, Front Page, Java Servlets, jsp, JDBC, Enterprise Java Beans, ColdFusion, Dream Weaver, Oracle Developer 2000/OLAP Earlier 2000s: consolidation of vendors, IBM (bought Informix), Microsoft, and Oracle. Earlier 2000s: consolidation of vendors, IBM (bought Informix), Microsoft, and Oracle.

4 10/16/2015 4Yan Huang - Introduction Major Vendors OverallUnix/LinuxWindows Oracle3263.334 IBM DB2 (Informix) 34.624.720.7 SQLServer16.3N/A39.9 Sybase2.6?? Market share $dollas vallue, source CNET May 2002

5 10/16/2015 5Yan Huang - Introduction DBMS Architecture

6 10/16/2015 6Yan Huang - Introduction Major Components of a DBMS Query processor/Query optimizer Query processor/Query optimizer Transaction manager Transaction manager Security/authorization manager Security/authorization manager Storage manager Storage manager

7 10/16/2015 7Yan Huang - Introduction Query Processor/Optimizer Decompose user queries into primitives Decompose user queries into primitives Find the best way (IO efficient) to execute the query Find the best way (IO efficient) to execute the query Two kinds of queries: Two kinds of queries: DML: data manipulation language DML: data manipulation language Insert, delete, update, select Insert, delete, update, select DDL: data definition language DDL: data definition language Create/drop/alter a table/index/view Create/drop/alter a table/index/view

8 10/16/2015 8Yan Huang - Introduction Query Languages SQL: standard/declarative language SQL: standard/declarative language ISO SQL-86, SQL-89, SQL-92, SQL-99, SQL-2003 ISO SQL-86, SQL-89, SQL-92, SQL-99, SQL-2003 Example: Example: SELECT name, age SELECT name, age FROM student FROM student WHERE gender = “female” WHERE gender = “female” Supported by most DB vendors Supported by most DB vendors

9 10/16/2015 9Yan Huang - Introduction Query Languages Relational algebra: formal, procedural language Relational algebra: formal, procedural language Query by example Query by example Domain relational calculus Domain relational calculus Tuple relational calculus Tuple relational calculus Datalog Datalog

10 10/16/2015 10Yan Huang - Introduction Transaction Manager A transaction is unit of work either completed as a full or not at all – atomicity A transaction is unit of work either completed as a full or not at all – atomicity Example transaction: Example transaction: Begin transaction Begin transaction A = A+10 A = A+10 B = B – 10 B = B – 10 End transaction End transaction Other than atomicity, concurrency control of transactions is also important Other than atomicity, concurrency control of transactions is also important

11 10/16/2015 11Yan Huang - Introduction Concurrency Control Informally, concurrency control means transactions executing currently should not produce results other than a serial execution of the same transactions Informally, concurrency control means transactions executing currently should not produce results other than a serial execution of the same transactions What will happen without concurrency control? What will happen without concurrency control? Partial work will be seen by others – dirty read Partial work will be seen by others – dirty read Your work may be mistakenly over written by others – dirty write Your work may be mistakenly over written by others – dirty write Example? Example?

12 10/16/2015 12Yan Huang - Introduction Security/Authorization Define user roles Define user roles Admin Admin User User Define what users can access which part of the database system: Define what users can access which part of the database system: Tables Tables Indices Indices Views Views

13 10/16/2015 13Yan Huang - Introduction Storage Manager Manage how data are stored in physical space, e.g. disk Manage how data are stored in physical space, e.g. disk How to read/write data How to read/write data We can also create indices on existing data We can also create indices on existing data Storage of indices need to be managed as well Storage of indices need to be managed as well

14 10/16/2015 14Yan Huang - Introduction Application Architectures Two-tier architecture: E.g. client programs using ODBC/JDBC to communicate with a database Three-tier architecture: E.g. web-based applications, and applications built using “middleware” Examples of Web application servers are Netscape Application Server, BEA Weblogic Enterprise, Borland AppServer and IBM's WebSphere Application Server

15 10/16/2015 15Yan Huang - - Introduction Benefits of DBMSs Compared to File systems A unified database interface vs. customized programs to interact with data A unified database interface vs. customized programs to interact with data Data integrity Data integrity Currency control Currency control Specialized fast query answering system, e.g. indexing, query optimization Specialized fast query answering system, e.g. indexing, query optimization Example? Example?

16 10/16/2015 16Yan Huang - Introduction Database Examples Human resource systems Human resource systems Library systems Library systems Airline reservation systems Airline reservation systems Product catalogs Product catalogs Banking systems Banking systems

17 10/16/2015 17Yan Huang - Introduction Three Levels of Abstraction Conceptual layer – things and their relationships Conceptual layer – things and their relationships Logical layer – how things and their relationships are specified in a DBMS Logical layer – how things and their relationships are specified in a DBMS Physical layer – how things and their relationships are stored in physical space, e.g. disks Physical layer – how things and their relationships are stored in physical space, e.g. disks The separation of these three layers allow the change of one or more layers without affecting the other layers The separation of these three layers allow the change of one or more layers without affecting the other layers

18 10/16/2015 18Yan Huang - Introduction Major Database Management Systems Oracle Oracle Microsoft SQL-server Microsoft SQL-server IBM DB2 + Informix IBM DB2 + Informix Sybase Sybase MySQL MySQL PostgreSQL PostgreSQL XML databases – native xml and relational database extensions to support XML XML databases – native xml and relational database extensions to support XML Most have object-relational database extensions Most have object-relational database extensions Also some main memory databases: timesTen (acquired by Oracle recently) Also some main memory databases: timesTen (acquired by Oracle recently)

19 10/16/2015 19Yan Huang - Introduction In This Class, We Will Talk about query languages: relational algebra, SQL Talk about query languages: relational algebra, SQL A logical data layer: relational database A logical data layer: relational database How to design a relational database How to design a relational database Basic concepts in object oriented and object relational databases (maybe) Basic concepts in object oriented and object relational databases (maybe) XML XML Access Control (indexing) Access Control (indexing) Transactions Transactions Introduction to data warehousing/data mining if time permits Introduction to data warehousing/data mining if time permits


Download ppt "10/16/2015 1Yan Huang - Introduction Chapter 1: Introduction What is a DBMS? What is a DBMS? A little history of DB A little history of DB Major Components."

Similar presentations


Ads by Google