Vous êtes sur la page 1sur 31

S.

N A N D A G O P A L A N
Professor & Head Dept. of Computer Science & Engineering Bangalore Institute of Technology Bangalore 560 004 snandagopalan@gmail.com Mobile: 98452-51144

What is a Database?
The collection of related data items is called as a database. Eg. Name, Telephone number and Address of your friends. Account number, Name of the account holder and Balance in a banking system

S. Nandagopalan, BIT

(a) Database Design and Application development (b) Data Analysis Queries (c) Concurrency Control (d) Recovery during failures (e) Efficiency and Scalability Storage of large datasets

S. Nandagopalan, BIT

1960 First DBMS designed by Charles Bachman at GE. IBMs Information Management System (IMS) 1970 Codd introduced the RDBMS 1980 Relational model became popular and accepted as the main database paradigm. SQL, ANSI SQL, etc. 1980 to 1990 New data models, powerful query languages, etc. Popular vendors are Oracle, SQL Server, IBMs DB2, Informix, etc.
S. Nandagopalan, BIT 4

Various types of data: Images, Text, complex queries, Data Mining, etc. Enterprise Resource Planning (ERP) Management Resource Planning (MRP) Database in Web Technologies

S. Nandagopalan, BIT

Multimedia databases Interactive video Streaming data Digital Libraries

S. Nandagopalan, BIT

Catalog in DBMS. Data definition in file systems is part of application programs Program-Data Independence Views Sharing and Transaction Processing

S. Nandagopalan, BIT

program -1 data description -1 program -2 data description -2 program -3 data description -3 File-1 File-2 File-3

A pplication program -1 w ith data sem antics D escription A pplication program -2 w ith data sem antics A pplication program -3 w ith data sem antics M anipulation C ontrol

Controlling Redundancy Restricting unauthorized access - Security Good GUI Integrity Constraints Backup and Recovery Easier and faster Application development

S. Nandagopalan, BIT

Data Model A data model is a collection of


High-level data description constructs that hide many low-level storage details Describes constraints

Relational Data Model Semantic Data Model ER Model

S. Nandagopalan, BIT

10

A Relation is a set of records and attributes. Also known as tuples and columns. A Schema is the description of data in terms of a data model. It is the conceptual organization of the entire database as viewed by the Database Administer
Eg. Student(RegNo : String, Name : String, Sem : Integer, Branch : String)

A SubSchema is the portion of the database as viewed by the application programs Eg. An employee database can contain all the data about an individual employee, but one group of users may be authorized to view only payroll data, while others are allowed access to only work history and medical data.
S. Nandagopalan, BIT 11

S. Nandagopalan, BIT

12

Relational Model Hierarchical Model Network Model Object-Oriented Model Object-Relational Model

S. Nandagopalan, BIT

13

External Schema - 1

External Schema - 2

External Schema - 3

Conceptual Schema

Physical Schema

14

Describes the stored data in terms of the data model of the DBMS. This leads to conceptual database design. Example: Student(RegNo:Integer, Name:String, Sem:Integer, Branch:String) Faculty(Fid:Integer, FName:String, Salary:Float) Course(CourseNo:Integer, CName:String, Credit:Integere, Dept:String) Section(SecId:Integer, CourseNo:Integer, Sem:Integer, Year:Integer, Instructor:String) GradeReport(RegNo:Integer, SecId:Integer, Grade:Char)
S. Nandagopalan, BIT 15

Describes the actual storage details of the relations described in conceptual schema. Primary indexing, sequential, binary, secondary indexing, etc. This leads to the physical database design

S. Nandagopalan, BIT

16

Describes several views of the database based on the database model. Several external schemas are possible for a single database. Each view is based upon the user requirements. Example: StdGrade(RegNo:Integer, Name:String, Sem:Integer, Grade:Char)
S. Nandagopalan, BIT 17

The data independence is the ability to change the schema at one level of a database system with out changing the schema at a higher level. Logical data Independence It is the ability to change the schema at one level of a database system without changing the external schema or application programs, is called as the logical data independence. With out changing the application programs, one can change the logical schema

S. Nandagopalan, BIT

18

Suppose the Faculty relation is modified as: Faculty_Public(Fid:Integer, FName:String, Office:Integer) Faculty_Private(Fid:Integer, Salary:Float) Any view designed before this modification can still retrieve the data with little modification (relation name) and obtain the same answer.
S. Nandagopalan, BIT 19

There are occasions for changing the internal structures for improved performance of the retrieval of data. Any change introduced to the internal schema or physical schema will not affect the other schemas.

S. Nandagopalan, BIT

20

DDL Data Definition Language VDL View Definition Language DML Data Manipulation Language (For data manipulations like insertion, deletion, update, retrieval, etc.)

S. Nandagopalan, BIT

21

Atomic operation Handling concurrent execution of transactions from several users. Example: Reservation systems, Banking systems. Transaction failures and recovery. Locking protocols. Log (WAL Write Ahead Log)
S. Nandagopalan, BIT 22

S. Nandagopalan, BIT

23

Web Forms

Front-End

SQL I/f

S. Nandagopalan, BIT

24

S. Nandagopalan, BIT

25

Database Implementers End Users Application Programmers DBA

S. Nandagopalan, BIT

26

Casual users These are people who use the database occasionally. Naive users These are users who constantly querying and updating the database. Eg. Reservation Clerks of Airline, Railway, Hotel, etc. Clerks at receiving station of Courier service, Insurance agencies, etc. Sophisticated Users People who use for their complex requirements. Eg. Engineers, Scientists, Business analysts Standalone Users Who maintain database for personal use.
S. Nandagopalan, BIT 27

Managing resources Creation of user accounts Providing security and authorization Managing poor system response time System Recovery Tuning the Database
S. Nandagopalan, BIT 28

S. Nandagopalan, BIT

29

S. Nandagopalan, BIT

30

S. Nandagopalan, BIT

31