Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)

Similar presentations


Presentation on theme: "CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)"— Presentation transcript:

1 CS462: Introduction to Database Systems

2 ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD) Kang  PhD candidate in computer science –Thesis title: QoS-aware real-time data management  Email: kk7v@cs.virginia.edukk7v@cs.virginia.edu  Office Hours: TBD (time & place) Course Web Page:  www.cs.virginia.edu/~kk7v/cs462/cs462.html www.cs.virginia.edu/~kk7v/cs462/cs462.html Textbook  Database Systems Concepts (4th ed), Silberschatz, Korth and Sudarshan, McGraw Hill

3 ©Silberschatz, Korth and Sudarshan1.3Database System Concepts Course Information Course objective  Introduce the fundamental concepts for design & development of relational database systems; Design & develop a relational database for a realistic application. Topics  Conceptual database design using ER model  Database integrity  Database design using functional dependencies (normal forms)  SQL (not syntax-oriented)  Storage & file structures  Indexing  Query processing  Transactions, concurrency control & database recovery

4 ©Silberschatz, Korth and Sudarshan1.4Database System Concepts Course Information Grading & evaluation  Midterm: 30%  Final: 40%  Project & homework: 20%  Class participation: 10% Reading assignments  Chapter 1 & Chapter 2  Course schedule & assignments can be found at the course web page

5 ©Silberschatz, Korth and Sudarshan1.5Database System Concepts Database Management System (DBMS) Models a particular enterprise  Collection of interrelated data  Set of programs to access the data  Convenient and efficient use Examples:  Banking  Airlines: reservations, schedules  Universities: registration, grades  Sales: customers, products, purchases  Manufacturing: production, inventory, orders, supply chain  Human resources: employee records, salaries, tax deductions Databases touch all aspects of our lives

6 ©Silberschatz, Korth and Sudarshan1.6Database System Concepts Why Database Systems? - Problems of Using File Systems? Data redundancy and inconsistency  Duplication of information in different files  e.g. customer address Difficulty in accessing data  Need to write a new program to carry out each new task  e.g. list of customers with a certain postal code  Data could be scattered possibly in different formats Integrity problems  Individual programs need to support integrity constraints (e.g. account balance > 0)  Hard to add new constraints or change existing ones

7 ©Silberschatz, Korth and Sudarshan1.7Database System Concepts Why Database Systems? - Problems of Using File Systems? Atomicity of updates  Failures may leave database in an inconsistent state with partial updates carried out  e.g. transfer of funds from one account to another should either complete or not happen at all Concurrent access anomalies  Concurrent accessed needed for performance  Uncontrolled concurrent accesses can lead to inconsistencies  e.g. two people read a balance and update it at the same time Database systems offer solutions to all the above problems

8 ©Silberschatz, Korth and Sudarshan1.8Database System Concepts Levels of Abstraction Physical level  How the data are actually stored. Logical level:  What data are stored in database?  Relationships among the data? type customer = record name: string; street: string; city: integer; end; View level  Hide details of data types  Simple interactions with DB  Security support  Create a new view

9 ©Silberschatz, Korth and Sudarshan1.9Database System Concepts Levels of Abstraction & Database Schema Schema  Logical structure of the DB  e.g., customers and accounts; the relationship between them  Physical schema: database design at the physical level  Logical schema: database design at the logical level Physical Data Independence  The ability to modify the physical schema without changing the logical schema  In general, the interfaces between the various levels and components should be well defined Physical Schema Conceptual Schema View 1View 2View 3

10 ©Silberschatz, Korth and Sudarshan1.10Database System Concepts Data Models A collection of tools for describing  data  data relationships  consistency constraints Entity-Relationship model Relational model Other models:  object-oriented model  semi-structured data models

11 ©Silberschatz, Korth and Sudarshan1.11Database System Concepts Entity-Relationship Model Example of schema in the entity-relationship model

12 ©Silberschatz, Korth and Sudarshan1.12Database System Concepts Entity Relationship Model (Cont.) E-R model of real world  Entities (objects)  E.g. customers, accounts, bank branch  Relationships between entities  E.g. Account A-101 is held by customer Johnson  Relationship set depositor associates customers with accounts Widely used for database design  Database design in E-R model usually converted to design in the relational model (coming up next) which is used for storage and processing

13 ©Silberschatz, Korth and Sudarshan1.13Database System Concepts Relational Model Use a collection of tables to represent data & their relationship customer- name Customer-id customer- street customer- city Johnson Smith Johnson Jones Smith 192-83-7465 019-28-3746 192-83-7465 321-12-3123 019-28-3746 Alma North Alma Main North Palo Alto Rye Palo Alto Harrison Rye Tuples (records) & atributes

14 ©Silberschatz, Korth and Sudarshan1.14Database System Concepts A Sample Relational Database

15 ©Silberschatz, Korth and Sudarshan1.15Database System Concepts Data Definition Language (DDL) Language used to define the database schema  E.g. create table account ( account-number char(10), balance integer) DDL compiler generates a set of tables & a data dictionary  Data dictionary contains metadata (i.e., data about data)  Database schema Specify the storage structure and access methods Consistency constraints

16 ©Silberschatz, Korth and Sudarshan1.16Database System Concepts Data Manipulation Language (DML) Language to access and manipulate the data organized by the appropriate data model  DML also known as query language Two classes of languages  Procedural – user specifies what data is required and how to get those data  Nonprocedural – user specifies what data is required without specifying how to get those data SQL (Structured Query Language)  E.g. select customer.customer-name from customer where customer.customer-id = ‘192-83-7465’  DB access from application programs  Embed SQL statements  API (e.g. ODBC/JDBC) to send SQL queries to the DB

17 ©Silberschatz, Korth and Sudarshan1.17Database System Concepts Overall System Structure

18 ©Silberschatz, Korth and Sudarshan1.18Database System Concepts Database Administrator Coordinates all the activities of the database system Good understanding of the enterprise’s information resources and needs. A DBA does:  Schema definition  Storage structure and access method definition  Schema and physical organization modification  Specifying integrity constraints  Acting as liaison with users  Granting user authority to access the database  Monitoring performance and responding to changes in requirements

19 ©Silberschatz, Korth and Sudarshan1.19Database System Concepts Transaction Management Transaction  A collection of operations that performs a single logical function in a database application, e.g., balance transfer transaction Transaction management component  Ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures. Concurrency control manager  Control the interaction among the concurrent transactions to ensure the consistency of the database.

20 ©Silberschatz, Korth and Sudarshan1.20Database System Concepts Storage Management Provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible to the following tasks:  interaction with the file manager  efficient storing, retrieving and updating of data


Download ppt "CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)"

Similar presentations


Ads by Google