Docsity

Database Management Systems - Lecture Slides | CSC 4480, Study notes of Deductive Database Systems

Toggle sidebar
bg1
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 1
Database Management Systems
Chapter 1
Instructor: Rick Schumeyer
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 2
What Is a DBMS?
๎š™A very large, integrated collection of data.
๎š™Models real-world enterprise.
๎šƒEntities (e.g., students, courses)
๎šƒRelationships (e.g., Madonna is taking CS564)
๎š™A Database Management System (DBMS) is a
software package designed to store and
manage databases.
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 3
Brief History
๎š™early 1960s: first general purpose database by
Charles Bachman from GE. Used the
network data model.
๎š™late 1960s: IBM developed Information
Management System (IMS). Used the
hierarchical data model. Led to SABRE, the
airline reservation system developed by AA
and IBM. Still in use today.
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 4
Brief History
๎š™1970: Edgar Codd of IBM developed the relational
data model. Led to several DBMS based on relational
model, as well as important theoretical results. Codd
wins Turing award.
๎š™1980s: relational model dominant. SQL standard.
๎š™Late 1980s, 1990s: DBMS vendors extend systems,
allowing more complex data types (images, text).
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 5
Files vs. DBMS
๎š™Application must stage large datasets
between main memory and secondary
storage (e.g., buffering, page-oriented access,
32-bit addressing, etc.)
๎š™Special code for different queries
๎š™Must protect data from inconsistency due to
multiple concurrent users
๎š™Crash recovery
๎š™Security and access control
Database Management Systems 3ed, R. Ramakrishnanand J. Gehrke 6
Why Use a DBMS?
๎š™Data independence and efficient acce ss.
๎š™Reduced application development time.
๎š™Data integrity and security.
๎š™Uniform data administration.
๎š™Concurrent access, recovery from crashes.
pf3
pf4

Partial preview of the text

Download Database Management Systems - Lecture Slides | CSC 4480 and more Study notes Deductive Database Systems in PDF only on Docsity!

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1

Database Management Systems

Chapter 1

Instructor: Rick Schumeyer [email protected]

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2

What Is a DBMS?

ย™ A very large, integrated collection of data. ย™ Models real-world enterprise. ยƒ Entities (e.g., students, courses) ยƒ Relationships (e.g., Madonna is taking CS564) ย™ A Database Management System (DBMS) is a software package designed to store and manage databases.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3

Brief History

ย™ early 1960s: first general purpose database by Charles Bachman from GE. Used the network data model. ย™ late 1960s: IBM developed Information Management System (IMS). Used the hierarchical data model. Led to SABRE, the airline reservation system developed by AA and IBM. Still in use today.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4

Brief History

ย™ 1970: Edgar Codd of IBM developed the relational data model. Led to several DBMS based on relational model, as well as important theoretical results. Codd wins Turing award. ย™ 1980s: relational model dominant. SQL standard. ย™ Late 1980s, 1990s: DBMS vendors extend systems, allowing more complex data types (images, text).

Files vs. DBMS

ย™ Application must stage large datasets between main memory and secondary storage (e.g., buffering, page-oriented access, 32-bit addressing, etc.) ย™ Special code for different queries ย™ Must protect data from inconsistency due to multiple concurrent users ย™ Crash recovery ย™ Security and access control

Why Use a DBMS?

ย™ Data independence and efficient access. ย™ Reduced application development time. ย™ Data integrity and security. ย™ Uniform data administration. ย™ Concurrent access, recovery from crashes.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 7

Why Study Databases??

ย™ Shift from computation to information ยƒ at the โ€œlow endโ€: scramble to webspace (a mess!) ยƒ at the โ€œhigh endโ€: scientific applications ย™ Datasets increasing in diversity and volume. ยƒ Digital libraries, interactive video, Human Genome project, EOS project ยƒ ... need for DBMS exploding ย™ DBMS encompasses most of CS ยƒ OS, languages, theory, โ€œAโ€I, multimedia, logic

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 8

Data Models

ย™ A data model is a collection of concepts for describing data. ย™ A schema is a description of a particular collection of data, using the a given data model. ย™ The relational model of data is the most widely used model today. ยƒ Main concept: relation , basically a table with rows and columns. ยƒ Every relation has a schema , which describes the columns, or fields.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 9

Levels of Abstraction

ย™ Many views , single conceptual (logical) schema and physical schema. ยƒ Views describe how users see the data. ยƒ Conceptual schema defines logical structure ยƒ Physical schema describes the files and indexes used.

  • Schemas are defined using DDL; data is modified/queried using DML.

Physical Schema

Conceptual Schema

View 1 View 2 View 3

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 10

Example: University Database

ย™ Conceptual schema: ยƒ Students(sid: string, name: string, login: string, dob: date, gpa:real) ยƒ Courses(cid: string, cname:string, credits:integer) ยƒ Enrolled(sid:string, cid:string, grade:string) ย™ Physical schema: ยƒ Relations stored as unordered files. ยƒ Index on first column of Students. ย™ External Schema (View): ยƒ Course_info(cid:string,enrollment:integer)

Relational Instance

12347 Guldu guldu@cs 3/4/1986 3.

12346 Smith smith@cs 2/3/1985 3.

12345 Jones jones@cs 1/1/1985 3.

sid name login dob gpa

Student table:

Data Independence *

ย™ Applications insulated from how data is structured and stored. ย™ Logical data independence : Protection from changes in logical structure of data. ย™ Physical data independence : Protection from changes in physical structure of data.

  • One of the most important benefits of using a DBMS!

Structure of a DBMS

ย™ A typical DBMS has a layered architecture. ย™ The figure does not show the concurrency control and recovery components. ย™ This is one of several possible architectures; each system has its own variations.

Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management

DB

These layers must consider concurrency control and recovery

Summary

ย™ DBMS used to maintain, query large datasets. ย™ Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security. ย™ Levels of abstraction give data independence. ย™ A DBMS typically has a layered architecture. ย™ DBAs hold responsible jobs and are well-paid! ย™ DBMS R&D is one of the broadest, most exciting areas in CS.