* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Introduction
Survey
Document related concepts
Relational algebra wikipedia , lookup
Serializability wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Functional Database Model wikipedia , lookup
Open Database Connectivity wikipedia , lookup
Clusterpoint wikipedia , lookup
Versant Object Database wikipedia , lookup
Concurrency control wikipedia , lookup
Transcript
Chapter 1: Introduction What is a DBMS? A little history of DB Major Components of a DBMS Three Levels of Abstraction 5/6/2017 Yan Huang - Introduction 1 What is a DBMS? DataBase Management System A bunch of programs Users use a language to ask questions about data that a DBMS manages DBMS understands the language and give answers as fast as possible 5/6/2017 Yan Huang - Introduction 2 History 1960s: network model (CODASYL) and hierarchical (IMS). 1970: E.F. Codd’s seminal paper on relational model for databases 1970s: 1976: P. Chen proposed the Entity-Relationship (ER) model 1980s: Commercialization of RDBMS, Oracle was the first Early 1990s: OO databases Mid-later 1990s: Web DB/data warehousing/data mining 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. 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. 5/6/2017 Yan Huang - Introduction 3 Major Vendors Overall Unix/Linux Windows Oracle 32 63.3 34 IBM DB2 (Informix) 34.6 24.7 20.7 SQLServer 16.3 N/A 39.9 Sybase 2.6 ?? ?? Market share $dollas vallue, source CNET May 2002 5/6/2017 Yan Huang - Introduction 4 DBMS Architecture 5/6/2017 Yan Huang - Introduction 5 Major Components of a DBMS Query processor/Query optimizer Transaction manager Security/authorization manager Storage manager 5/6/2017 Yan Huang - Introduction 6 Query Processor/Optimizer Decompose user queries into primitives Find the best way (IO efficient) to execute the query Two kinds of queries: DML: data manipulation language DDL: data definition language 5/6/2017 Insert, delete, update, select Create/drop/alter a table/index/view Yan Huang - Introduction 7 Query Languages SQL: standard/declarative language Example: ISO SQL-86, SQL-89, SQL-92, SQL-99, SQL-2003 SELECT name, age FROM student WHERE gender = “female” Supported by most DB vendors 5/6/2017 Yan Huang - Introduction 8 Query Languages Relational algebra: formal, procedural language Query by example Domain relational calculus Tuple relational calculus Datalog 5/6/2017 Yan Huang - Introduction 9 Transaction Manager A transaction is unit of work either completed as a full or not at all – atomicity Example transaction: Begin transaction A = A+10 B = B – 10 End transaction Other than atomicity, concurrency control of transactions is also important 5/6/2017 Yan Huang - Introduction 10 Concurrency Control 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? 5/6/2017 Partial work will be seen by others – dirty read Your work may be mistakenly over written by others – dirty write Example? Yan Huang - Introduction 11 Security/Authorization Define user roles Admin User Define what users can access which part of the database system: 5/6/2017 Tables Indices Views Yan Huang - Introduction 12 Storage Manager Manage how data are stored in physical space, e.g. disk How to read/write data We can also create indices on existing data 5/6/2017 Storage of indices need to be managed as well Yan Huang - Introduction 13 Application Architectures Examples of Web application servers are Netscape Application Server, BEA Weblogic Enterprise, Borland AppServer and IBM's WebSphere Application Server 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” 5/6/2017 Yan Huang - Introduction 14 Benefits of DBMSs Compared to File systems A unified database interface vs. customized programs to interact with data Data integrity Currency control Specialized fast query answering system, e.g. indexing, query optimization Example? 5/6/2017 Yan Huang - - Introduction 15 Database Examples Human resource systems Library systems Airline reservation systems Product catalogs Banking systems 5/6/2017 Yan Huang - Introduction 16 Three Levels of Abstraction Conceptual layer – things and their relationships 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 The separation of these three layers allow the change of one or more layers without affecting the other layers 5/6/2017 Yan Huang - Introduction 17 Major Database Management Systems Oracle Microsoft SQL-server IBM DB2 + Informix Sybase MySQL PostgreSQL XML databases – native xml and relational database extensions to support XML Most have object-relational database extensions Also some main memory databases: timesTen (acquired by Oracle recently) 5/6/2017 Yan Huang - Introduction 18 In This Class, We Will Talk about query languages: relational algebra, SQL A logical data layer: relational database How to design a relational database Basic concepts in object oriented and object relational databases (maybe) XML Access Control (indexing) Transactions Introduction to data warehousing/data mining if time permits 5/6/2017 Yan Huang - Introduction 19