dbs lecture#1
TRANSCRIPT
-
8/9/2019 DBS Lecture#1
1/17
Database Systems:Introduction
Professor Navneet GoyalDepartment of Computer Science & Information Systems
BITS, Pilani
-
8/9/2019 DBS Lecture#1
2/17
Prof. Navneet Goyal, BITS, Pilani
Text BookHector G Molina, Jeffrey D.Ullman & Jennifer Widom.
Database Systems The Complete Book,Pearson Education, 2002.
Home Page:
http://www-db.stanford.edu/~ullman/dscb.html
-
8/9/2019 DBS Lecture#1
3/17
Prof. Navneet Goyal, BITS, Pilani
Reference Books Ramakrishna R. & Gehrke J.
Database Management Systems, 3e, Mc-Graw Hill,2003.http://www/cs.wisc.edu/~dbbook
Silberschatz A, Korth H F, & Sudarshan S.Database System Concepts, 5e, TMH, 2005.http://www.db-book.comhttp://www.mhhe.com/silberschatz
Elmarsi R, & Navathe S B.Fundamental of Database System, 4e, PearsonEducation, 2004.http://www.aw.com/cssupport
-
8/9/2019 DBS Lecture#1
4/17
Prof. Navneet Goyal, BITS, Pilani
Topics Evolution of Databases Data, Database, DBMS, & DBS Data Modeling Relational Databases Schema Design & Normalization Query Languages Storage & Indexing Query Processing & Optimization Concurrency Crash Recovery Advanced Topics
-
8/9/2019 DBS Lecture#1
5/17
Prof. Navneet Goyal, BITS, Pilani
Basic Definitions Database: A collection of related data. Data: Known facts that can be recorded and
have an implicit meaning.
Mini-world: Some part of the real world aboutwhich data is stored in a database. For example,student grades and transcripts at a university.
Database Management System (DBMS): Asoftware package/ system to facilitate thecreation and maintenance of a computerizeddatabase.
Database System: The DBMS softwaretogether with the data itself. Sometimes, theapplications are also included.
-
8/9/2019 DBS Lecture#1
6/17
Prof. Navneet Goyal, BITS, Pilani
DBMS Functionalities Define a database : in terms of data types,
structures and constraints
Construct or Load the Database on asecondary storage medium
Manipulating the database : querying,generating reports, insertions, deletionsand modifications to its content
Concurrent Processing and Sharing by a setof users and programs yet, keeping alldata valid and consistent
Crash Recovery
-
8/9/2019 DBS Lecture#1
7/17
Prof. Navneet Goyal, BITS, Pilani
File System vs. DBMS A company has 500 GB of data on
employees, departments, products, sales,& so on..
Data is accessed concurrently by severalemployees
Questions about the data must beanswered quickly
Changes made to the data by differentusers must be applied consistently Access to certain parts of the data be
restricted
-
8/9/2019 DBS Lecture#1
8/17
Prof. Navneet Goyal, BITS, Pilani
File System vs. DBMS Data stored in operating system files
Many drawbacks!!! 500 GB of main memory not available to hold all data.
Data must be stored on secondary storage devices Even if 500GB of main memory is available, with 32-bit
addressing, we cannot refer directly to more than 4GBof data
Data redundancy and inconsistency Multiple file formats, duplication of information in different
files
Special program to answer each question a user mayask
-
8/9/2019 DBS Lecture#1
9/17
Prof. Navneet Goyal, BITS, Pilani
File System vs. DBMS Many drawbacks!!!
Integrity problems Integrity constraints (e.g. account balance > 0) becomeburied in program code rather than being statedexplicitly
Hard to add new constraints or change existing ones
We must protect the data from inconsistent changesmade by different users. If application programs needto address concurrency, their complexity increasesmanifolds
Consistent state of data must be restored if the systemcrashes while changes are being made OS provide only a password mechanism for security.
Not flexible enough if users have permission to accesssubsets of data
-
8/9/2019 DBS Lecture#1
10/17
Prof. Navneet Goyal, BITS, Pilani
File System vs. DBMS These drawbacks have prompted the
development of database systems
Database systems offer solutions toall the above problems?
-
8/9/2019 DBS Lecture#1
11/17
Prof. Navneet Goyal, BITS, Pilani
Advantages of a DBMS Program-Data Independence
Insulation between programs and data: Allowschanging data storage structures and operations
without having to change the DBMS access programs. Efficient Data Access
DBMS uses a variety of techniques to store & retrievedata efficiently
Data Integrity & Security
Before inserting salary of an employee, the DBMS cancheck that the dept. budget is not exceeded
Enforces access controls that govern what data isvisible to different classes of users
-
8/9/2019 DBS Lecture#1
12/17
Prof. Navneet Goyal, BITS, Pilani
Advantages of a DBMS Data Administration
When several users share data , centralizing theadministration offers significant improvement
Concurrent Access & Crash Recovery DBMS schedules concurrent access to the data in such
a manner that users think of the data as beingaccessed by only one user at a time
DBMS protects users from the ill-effects of systemfailures
Reduced Application Development Time Many important tasks are handled by the DBMS
-
8/9/2019 DBS Lecture#1
13/17
Prof. Navneet Goyal, BITS, Pilani
Databases Everywhere!!! DBMS contains information about a particular enterprise
Collection of interrelated data Set of programs to access the data An environment that is both convenientand efficientto use
Database Applications: Banking: all 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 touch all aspects of our lives
-
8/9/2019 DBS Lecture#1
14/17
Prof. Navneet Goyal, BITS, Pilani
Levels of Abstraction Databases provide users with an
abstract view of data
-
8/9/2019 DBS Lecture#1
15/17
Prof. Navneet Goyal, BITS, Pilani
Levels of Abstraction
Many views, singleconceptual (logical)schema andphysicalschema.
Views describe how userssee the data.
Conceptual schema defineslogical structure
Physical schema describesthe 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
-
8/9/2019 DBS Lecture#1
16/17
Q & A
-
8/9/2019 DBS Lecture#1
17/17
Thank You