0% found this document useful (0 votes)
41 views47 pages

Unit 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views47 pages

Unit 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 47

DATABASE MANAGEMENT SYSTEM (313315)

DATABASE MANAGEMENT SYSTEM


Semester : Third
Course Title : DATABASE MANAGEMENT SYSTEM (DMS)
Course Code : 313315

CL- Class Room Learning , TL- Tutorial Learning, LL-Laboratory Learning, SLH-Self Learning
Hours, NLH-Notional Learning Hours, FA - Formative Assessment, SA -Summative assessment,
IKS - Indian Knowledge System, SLA - Self Learning Assessment Legends: @ Internal
Assessment, # External Assessment, *# On Line Examination , @$ Internal Online
DATABASE MANAGEMENT SYSTEM (313315)

DATABASE MANAGEMENT SYSTEM


Note :
1. FA-TH represents average of two class tests of 30 marks each conducted
during the semester.
2. If candidate is not securing minimum passing marks in FA-PR of any
course then the candidate shall be declared as "Detained" in that
semester.
3. If candidate is not securing minimum passing marks in SLA (Self
Learning Assessment) of any course then the candidate shall be
declared as fail and will have to repeat and resubmit SLA work.
4. Notional Learning hours for the semester are (CL+LL+TL+SL)hrs.* 15
Weeks
5. 1 credit is equivalent to 30 Notional hrs.
6. * Self learning hours shall not be reflected in the Time Table.
7. * Self learning includes micro project / assignment / other activities.
DATABASE MANAGEMENT SYSTEM (313315)

DATABASE MANAGEMENT SYSTEM


RATIONALE:
This course focuses on fundamentals of relational database
management system and enables students to design and manage
database for various software applications.
It also provides students with theoretical knowledge and practical
skills in the use of databases and database management systems in
Information Technology applications.
DATABASE MANAGEMENT SYSTEM (313315)

DATABASE MANAGEMENT SYSTEM

INDUSTRY / EMPLOYER EXPECTED OUTCOME

To design database and use any RDBMS package as a backend for


developing database applications
DATABASE MANAGEMENT SYSTEM (313315)

DATABASE MANAGEMENT SYSTEM


COURSE LEVEL LEARNING OUTCOMES (COS)

Students will be able to achieve & demonstrate the following COs on


completion of course based learning

CO1 - Explain concept of database management system.


CO2 - Design the database for given problem.
CO3 - Manage database using SQL.
CO4 - Implement PL/SQL codes for given application.
CO5 - Apply security and backup methods on database.
DATABASE MANAGEMENT SYSTEM (313315)

Practical List
DATABASE MANAGEMENT SYSTEM (313315)

Practical List
DATABASE MANAGEMENT SYSTEM (313315)
Practical List
DATABASE MANAGEMENT SYSTEM (313315)

Learning Activities
DATABASE MANAGEMENT SYSTEM (313315)

Specification Table
DATABASE MANAGEMENT SYSTEM (313315)

Books to be referred
DATABASE MANAGEMENT SYSTEM (313315)

Websites & Portals


DATABASE MANAGEMENT SYSTEM (313315)

Unit - I Introduction To Database


System
1.1 Database concepts:-Data, Database, Database
management system, File system Vs DBMS, Applications
of DBMS, Data Abstraction, Data Independence,
Database Schema, The Codd’s rules, Overall structure of
DBMS
1.2 Architecture:- Two tier and Three tier architecture of
database.
1.3 Data Models:- Hierarchical, Networking, Relational
Data Models.
DATABASE MANAGEMENT SYSTEM (313315)

Unit - I Introduction To Database


System
Theory Learning Outcomes (TLO's)aligned to CO's.

TLO 1.1 Explain given database concept.


TLO 1.2 Explain Overall structure of DBMS
TLO 1.3 Describe architecture of database.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Database concepts


Data:
Data is the raw fact.
Database:
Database is collection of data, which is organized in such a way that
it can be easily accessed, managed or updated.
DBMS: Database Management System is software that used to
manage, storage, access and security of data.
OR
DBMS: Database management system is a large software package that
controls the specification, organization, storage, retrieval and update
of data in a database.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 File system Vs DBMS


DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Applications of DBMS


• Airlines: reservations, schedules, etc
• Telecom: calls made, customer details, network usage, etc
• Universities: registration, results, grades, etc
• Sales: products, purchases, customers, etc
• Banking: all transactions etc
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Abstraction


• Data abstraction means hiding details from users that are not
relevant to them. The process helps simplify complex data
structures. Data abstraction has three levels: physical, logical, and
view.
• Three Levels of Data Abstraction:
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Abstraction


• 1. Physical
• The lowest level is physical, and it tells how storing of data takes
place in memory. It uses access methods, including random or
sequential access and file organization methods including B+ trees
or hashing. While designing the database, the factors required are
memory size and the number of times it records. For example, if we
need to store the details of a student in the university database.
Then the memory used and blocks of storage are not shown to the
user.

2. Logical
This is the intermediate level and consists of the information in the
form of tables stored in the database.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 1.1 Data Abstraction


The information available at the view level is unknown at this level.
Here simpler structures are used to store relationship among data
entities. Also, we can store student attributes in an institution and his
relationship with other entities.
3. View
The highest level is the view, and at this level, only some part of the
database is visible to the users. The user gets the ease of access to use
the database at this level. Data is present in the form of rows and
columns for the users. The same database can be viewed multiple
times, but storage and implementation details are kept hidden from
the user.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Abstraction


• Data abstraction is used to achieve data independence, which
further saves the time and cost in cases of modification and
alteration of the database.
• These levels of abstraction give rise to two levels of data
independence, namely physical level data independence, and
logical level data independence.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Independance


Data Independence:
Data independence is a property of a
database management system by
which we can change the database
schema at one level of the database
system without changing the database
schema at the next higher level.

Two Levels of Data Independence


• Physical Level of Data
Independence
• Logical Level of Data Independence
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Independence


Physical Level of Data Independence-
This level of data independence means the modification of physical
schema without making any alterations in the logical schema, which is
done for optimization.
For example, if there is a change in the size of the storage of the
database, there will be no effect on the conceptual structure of the
database. The modifications may include the utilization of new storage
devices, change of data structures and alterations in indexes.
• Logical Level of Data Independence
This level means the ability to modify logical schema without any
alterations to the external schema. Here if the conceptual view of the
data is altered or changed, the user view of the data does not get
affected.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Data Independence


The changes or modifications may include:
• Inserting or deleting an attribute from the database.
• Alterations in entities of table structures.
• Changes in the relationships to the logical schema.

• Database Schema : (describe command is used to see schema)


A schema can be defined as the design of a database. The overall
description of the database is called the database schema.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


• Dr Edgar F. Codd, after his extensive research on the Relational
Model of database systems, came up with twelve rules of his own,
which according to him, a database must obey in order to be
regarded as a true relational database.
• These rules can be applied on any database system that manages
stored data using only its relational capabilities. This is a foundation
rule, which acts as a base for all the other rules.

• Rule 1: Information Rule:


The data stored in a database, may it be user data or metadata, must
be a value of some table cell. Everything in a database must be stored
in a table format.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


Rule 2: Guaranteed Access Rule
• Every single data element (value) is guaranteed to be accessible
logically with a combination of table-name, primary-key (row
value), and attribute-name (column value). No other means, such
as pointers, can be used to access data.
Rule 3: Systematic Treatment of NULL Values
• The NULL values in a database must be given a systematic and
uniform treatment. This is a very important rule because a NULL
can be interpreted as one the following − data is missing, data is
not known, or data is not applicable.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


Rule 4: Active Online Catalog
• The structure description of the entire database must be stored in
an online catalog, known as data dictionary, which can be accessed
by authorized users. Users can use the same query language to
access the catalog which they use to access the database itself.
Rule 5: Comprehensive Data Sub-Language Rule
• A database can only be accessed using a language having linear
syntax that supports data definition, data manipulation, and
transaction management operations. This language can be used
directly or by means of some application. If the database allows
access to data without any help of this language, then it is
considered as a violation.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


Rule 6: View Updating Rule
All the views of a database, which can theoretically be updated, must
also be updatable by the system.
Rule 7: High-Level Insert, Update, and Delete Rule
A database must support high-level insertion, updation, and deletion.
This must not be limited to a single row, that is, it must also support
union, intersection and minus operations to yield sets of data records.
Rule 8: Physical Data Independence
The data stored in a database must be independent of the
applications that access the database. Any change in the physical
structure of a database must not have any impact on how the data is
being accessed by external applications.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


• Rule 9: Logical Data Independence
The logical data in a database must be independent of its user’s view
(application). Any change in logical data must not affect the
applications using it. For example, if two tables are merged or one is
split into two different tables, there should be no impact or change on
the user application. This is one of the most difficult rule to apply.
• Rule 10: Integrity Independence
A database must be independent of the application that uses it. All its
integrity constraints can be independently modified without the need
of any change in the application. This rule makes a database
independent of the front-end application and its interface.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Codd’s Rules


Rule 11: Distribution Independence
• The end-user must not be able to see that the data is distributed
over various locations. Users should always get the impression that
the data is located at one site only. This rule has been regarded as
the foundation of distributed database systems.

Rule 12: Non-Subversion Rule


• If a system has an interface that provides access to low-level
records, then the interface must not be able to subvert the system
and bypass security and integrity constraints.
DATABASE MANAGEMENT SYSTEM (313315)
Unit I 1.1 Overall structure of DBMS
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


Components And Overall Structure of DBMS.
Components of DBMS are broadly classified as follows :
1. Query Processor :
a) DML Compiler
b) Embedded DML pre-compiler
c) DDL Interpreter
d) Query Evaluation Engine

2. Storage Manager :
e) Authorization and Integrity Manager
f) Transaction Manager
g) File Manager
h) Buffer Manager
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


Components And Overall Structure of DBMS.
Components of DBMS are broadly classified as follows :
3. Disk storage:
(a) Data Files
(b) Data Dictionary
(c) Indices
(d) Statistical Data
Query Processor Components :
• DML Pre-compiler : It translates DML statements in a query
language into low level instructions that query evaluation engine
understands. It also attempts to transform user's request into an
equivalent but more efficient form.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


• Embedded DML Pre-compiler :
It converts DML statements embedded in an application program to
normal procedure calls in the host language. The Pre-compiler must
interact with the DML compiler to generate the appropriate code.
• DDL Interpreter :
It interprets the DDL statements and records them in a set of tables
containing meta data or data dictionary.
• Query Evaluation Engine :
It executes low-level instructions generated by the DML compiler.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


2. Storage Manager Components : They provide the interface
between the low-level data stored in the database and application
programs and queries submitted to the system.
• Authorization and Integrity Manager : It tests for the satisfaction of
integrity constraints checks the authority of users to access data.
• Transaction Manager : It ensures that the database remains in a
consistent state despite the system failures and that concurrent
transaction execution proceeds without conflicting.
• File Manager : It manages the allocation of space on disk storage
and the data structures used to represent information stored on disk.
• Buffer Manager : It is responsible for fetching data from disk storage
into main memory and deciding what data to cache in memory.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


3. Disk Storage : Following data structures are required as a part of
the physical system implementation.
• Data Files : It stores the database.
• Data Dictionary : It stores meta data (data about data) about the
structure of the database.
• Indices : Provide fast access to data items that hold particular
values.
• Statistical Data : It stores statistical information about the data in
the database. This information is used by query processor to select
efficient ways to execute query.
DATABASE MANAGEMENT SYSTEM (313315)
Unit I 1.2 Two-Tier architecture of
database.
The 2-tier architecture is similar to a basic
client-server model.
The application at the client end directly
communicates with the database on the server
side. APIs like ODBC and JDBC are used for this
interaction.
The server side is responsible for providing query
processing and transaction management
functionalities.
On the client side, the user interfaces and
application programs are run.
The application on the client side establishes a connection with the server side to
communicate with the DBMS.
DATABASE MANAGEMENT SYSTEM (313315)

Unit I 1.1 Overall structure of DBMS


In 3-Tier Architecture, there is another layer between
the client and the server. The client does not directly
communicate with the server. Instead, it interacts
with an application server which further
communicates with the database system and then
the query processing and transaction management
takes place.

This intermediate layer acts as a medium for the exchange of partially processed
data between the server and the client. This type of architecture is used in the case
of large web applications.

An advantage of this type is that maintenance and understanding are easier, and
compatible with existing systems. However, this model gives poor performance
when there are a large number of users.
DATABASE MANAGEMENT SYSTEM (313315)

Unit - II Relational Data Model

2.1 Relational Structure :- Tables (Relations), Rows (Tuples), Domains,


Attributes, Entities
2.2 Keys :- Super Keys, Candidate Key, Primary Key, Foreign Key.
2.3 Data Constraints :- Domain Constraints ,Referential Integrity
Constraints
2.4 Entity Relationship Model : - Strong Entity set, Weak Entity set,
Types of Attributes, Symbols for ER diagram, ER Diagrams
2.5 Normalization:- Functional dependencies, Normal forms: 1NF, 2NF,
3NF
DATABASE MANAGEMENT SYSTEM (313315)

Unit - II Relational Data Model


2.1 Relational Structure :- Tables (Relations), Rows (Tuples), Domains,
Attributes, Entities
DATABASE MANAGEMENT SYSTEM (313315)

Unit - II Relational Data Model


Theory Learning Outcomes (TLO's)aligned to CO's.

TLO 2.1 Explain relational structure of database.


TLO 2.2 State types of keys with example.
TLO 2.3 Draw ER diagrams for given problem.
TLO 2.4 Explain different normalization forms.
DATABASE MANAGEMENT SYSTEM (313315)

Unit - III Interactive SQL & Performance


Tuning
3.1 SQL: -Data-types, Data Definition Language (DDL), Data
Manipulation language (DML), Data Control Language (DCL),
Transaction Control Language (TCL).
3.2 Clauses & Join:- Different types of clauses - Where, Group
by ,Order by, Having Joins: Types of Joins, Nested queries.
3.3 Operators:- Relational, Arithmetic, Logical, Set operators.
3.4 Functions:- Numeric , Date and time, String functions, Aggregate
Functions.
3.5 Views, Sequences, Indexes: -Views : Concept ,Create ,Update Drop
Views. Sequences :- Concept ,Create, Alter , Drop, Use of Sequence in
table, Index: Concept ,Types of Index , Create ,Drop Indexes
DATABASE MANAGEMENT SYSTEM (313315)

Unit - III Interactive SQL &


Performance Tuning
Theory Learning Outcomes (TLO's)aligned to CO's.

TLO 3.1 Write SQL queries using DDL, DML, DCL and TCL.
TLO 3.2 Write SQL queries to join relations.
TLO 3.3 Write SQL queries for ordering and grouping data.
TLO 3.4 Use various class of operators in SQL. .
TLO 3.5 Create schema objects for performance tunning.
DATABASE MANAGEMENT SYSTEM (313315)

Unit - IV PL/SQL Programming


4.1 Introduction of PL/SQL: -Advantages of PL/SQL,The PL/SQL Block
Structure, PL/SQL Data Types, Variable , Constant
4.2 Control Structure:- Conditional Control, Iterative Control,
Sequential Control.
4.3 Exception handling: -Predefined Exception, User defined
Exception.
4.4 Cursors:- Implicit and Explicit Cursors,Declaring opening and
closing cursor,fetching a record from cursor ,cursor for
loops,parameterized cursors
4.5 Procedures:- Advantages, Create, Execute and Delete a Stored
Procedure
4.6 Functions:- Advantages, Create, Execute and Delete a Function
DATABASE MANAGEMENT SYSTEM (313315)

Unit -IV PL/SQL Programming


Theory Learning Outcomes (TLO's)aligned to CO's.

TLO 4.1 Use control Structures in PL-SQL.


TLO 4.2 Handle different types of exceptions.
TLO 4.3 Explain various types of cursors.
TLO 4.4 Create Procedure, Function on given problem.
TLO 4.5 Explain types of triggers with examples
DATABASE MANAGEMENT SYSTEM (313315)

Unit - V Database Administration


5.1 Introduction to database administration:- Types of database users,
Create and delete users, Assign privileges to users
5.2 Transaction: Concept, Properties & States of Transaction
5.3 Database Backup: Types of Failures, Causes of Failure, Database
backup introduction, types of database backups: Physical & Logical
5.4 Data Recovery – Recovery concepts , recovery techniques- roll
forward ,Rollback
5.5 Overview of Advanced database concepts:- Data Warehouse ,Data
lakes , Data mining, Big data ,Mongo DB , DynamoDB,
DATABASE MANAGEMENT SYSTEM (313315)

Unit - V Database Administration


Theory Learning Outcomes (TLO's)aligned to CO's.

TLO 5.1 Implement SQL queries for database administration.


TLO 5.2 Explain concept of various types database backup processes.
TLO 5.3 Describe various terms related to advanced database
concepts.

You might also like