ADV DB Introduction
ADV DB Introduction
2
Course Materials
❑(Books)
▪ Database System Concepts Seventh Edition. Abraham
Silberschatz, Henry F. Korth, And S. Sudarshan.
▪ Modern Database Management 12 Edition. Jeffrey A.
Hoffer, V. Ramesh, And Heikki Topi.
▪ Fundamentals Of Database System Seventh Edition.
Ramez Elmasri , Shamkant B. Navathe
❑ Online Lab
▪ sql.js demo: Online SQL interpreter (db-book.com)
3
Advanced Database
Introduction
4
Outline
•The Need for Databases
•Data Models
•Relational Databases
•Database Design
•Storage Manager
•Query Processing
•Transaction Manager
Database Management System (DBMS)
• DBMS contains information about a particular enterprise
• Collection of interrelated data
• Set of programs to access the data
• An environment that is both convenient and efficient to use
• Database Applications:
• Banking: transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Online retailers: order tracking, customized recommendations
• Manufacturing: production, inventory, orders, supply chain
• Human resources: employee records, salaries, tax deductions
• Databases can be very large.
• Databases touch all aspects of our lives
University Database Example
Rows
A Sample Relational Database
Data Definition Language (DDL)
• Specification notation for defining the database schema
Example: create table instructor (
ID char(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2))
• DDL compiler generates a set of table templates stored in a data dictionary
• Data dictionary contains metadata (i.e., data about data)
• Database schema
• Integrity constraints
• Primary key (ID uniquely identifies instructors)
• Authorization
• Who can access what
Data Manipulation Language (DML)
• Language for accessing and manipulating the data organized
by the appropriate data model
• DML also known as query language
• Two classes of languages
• Pure – used for proving properties about computational power and
for optimization
• Relational Algebra
• Tuple relational calculus {t| P(t)}
• Domain relational calculus
• Commercial – used in commercial systems
• SQL is the most widely used commercial language
SQL
Database
Database System Internals
Database Architecture
The architecture of a database systems is greatly influenced by
the underlying computer system on which the database is
running:
• Centralized
• Client-server
• Parallel (multi-processor)
• Distributed
History of Database Systems
• 1950s and early 1960s:
• Data processing using magnetic tapes for storage
• Tapes provided only sequential access
• Punched cards for input
• Late 1960s and 1970s:
• Hard disks allowed direct access to data
• Network and hierarchical data models in widespread use
• Ted Codd defines the relational data model
• Would win the ACM Turing Award for this work
• IBM Research begins System R prototype
• UC Berkeley begins Ingres prototype
• High-performance (for the era) transaction processing
History (cont.)
• 1980s:
• Research relational prototypes evolve into commercial systems
• SQL becomes industrial standard
• Parallel and distributed database systems
• Object-oriented database systems
• 1990s:
• Large decision support and data-mining applications
• Large multi-terabyte data warehouses
• Emergence of Web commerce
• Early 2000s:
• XML and XQuery standards
• Automated database administration
• Later 2000s:
• Giant data storage systems
• Google BigTable, Yahoo PNuts, Amazon, ..
Thank You…