Database Management Systems
Instructor: Yrd. Doç. Dr. Cengiz Örencik
E-mail: [email protected]
Course material http://myweb.sabanciuniv.edu/cengizo/cours
es◦ all the notes will be shared there
Course info
Not required You may use any database book
Database Management Systems – 3rd Edition◦ Ramakrishnan and Gehrke
Book
Midterm 40% Inclass quizzes (2) 10% Final 50%
Hws◦ Self study◦ Not to be graded
4
Grading
Managing data Introduction to Database design
◦ Entities, attributes, relationships, etc.◦ ER model
Relational Model◦ Representing data◦ Create, modify, query…
Relational Algebra vs. SQL Storage and Indexing Transaction Management
◦ Concurrency control◦ Crash recovery
5
Aims to learn
Database Management System (DBMS) provides….
… efficient, reliable, convenient, and safe multi-user storage of and access to massive amounts of persistent data.
Intro
Massive – terrabytes/day Persistent Safe – hard/software failure, power cut Multi-user Convenient Efficient Reliable
DBMS
A Database Management System (DBMS) is a software package designed to store and manage databases
We will not consider: Database applications may be programmed via
“frameworks”◦ Environments that help to develop program◦ Ruby on rails, Django…
DBMS may run in conjunction with “middleware”◦ Web servers that interact with database
Data-intensive applications may not use DBMS at all◦ Store everything on files
DBMS
Data independence ◦ Application programs don’t need details of data representation and
storage Efficient access
◦ A variety of techniques Data integrity and security
◦ Enforce constraints, access control… Uniform data administration
◦ How different groups of users use it◦ Organized to minimize redundancy
Reduced application development time◦ DBMS support most common important functions
Concurrent access, recovery from crashes◦ Multiple users use it without conflict◦ Protect from effects of system failures
Why Use a DBMS?
Data described as a set of records
Example: Student information in a university
Students(sid: integer, name: string, mail: string, age: integer, gpa: real)
Relational Model
Sid Name Mail Age Gpa53666 Jone jone@cs 20 3.253680 Smith smith@cs 21 2.953442 Smith smith@mat
h19 3.85
53123 Alice alice@ee 21 3.5
Relation student Each column attributes
Each row is a record that describes a student
Integrity constraints◦ Sid must be unique
Relational model
What is the name of the student with sid 53680?
How many students are enrolled to DBMS course?
What fraction of students of DBMS course get a grade better than BB?
Queries
DBMS implementer◦ Builds the system◦ Works for IBM or Oracle
Database designer◦ Interact users◦ Establishes the schema - relations◦ How to structure – how to store
Database application developer◦ Builds the programs that operate on the database◦ Use tools DBMS provides◦ Usually not computer professionals
Database administrator◦ loads the data, keep it running
Key People
DBMS used to maintain, query large datasets
Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security
DBAs hold responsible jobs and are well paid
Whether you know it or not, you’re using a database every hour
Summary