Database Management System: Course Outcome
Database Management System: Course Outcome
Database
Management
System
UNIT-II [10h]
Functional dependencies and Normalization: Functional dependencies, Decomposition, Full
Functional Dependency (FFD), Transitive Dependency (TD), Join Dependency (JD), Multi-valued
Dependency (MVD), Normal Forms (1NF, 2NF, 3NF, BCNF), De-normalization.
Database Security: Introduction, Threats, Counter Measures.
Control Structures: Introduction to conditional control, Iterative control and sequential control
statements, Cursors, Views.
UNIT-III
[10h]
Package, Procedures and Triggers: Parts of procedures, Parameter modes, Advantages of
procedures, Syntax for creating triggers, Types of triggers, package specification and package body,
developing a package, Bodiless package, Advantages of packages.
Transaction Management and Concurrency Control: Introduction to Transaction Processing,
Properties of Transactions, Serializability and Recoverability, Need for Concurrency Control, Locking
Techniques, Time Stamping Methods, Optimistic Techniques and Granularity of Data items.
Chapter 1.2
(Data Models)
Learning Objective
• Method to organize data required in an application as
relations.
• Importance for an integrated database in organizations.
• Goals of Data Base Management systems (DBMS).
• Entity-Relationship(ER) modeling to develop a
conceptual model of data.
• Structure and organization of DBMS
Learning Outcome
• Define program-data independence, data models for
database systems, database schema and database
instances.
• Identify the methodology of conceptual modeling
through Entity Relationship model.
• Identify the methodology of logical model.
• Identify the methodology of physical model.
Relationship Types
• Specialization
• Generalization
• Aggregation
Specialization
In specializatin, an entty is divided
inti sub-enttes based in their
characteristcs. It is a tip-diwn
appriach where higher level entty is
specialized inti twi ir mire liwer level
enttes.
For Example, EMPLOYEE entty in an
Empliyee management system can be
specialized inti DEVELOPER, TESTER
etc. as shiwn in Figure 2. In this case,
cimmin atributes like E_NAME, E_SAL
etc. becime part if higher entty
(EMPLOYEE) and specialized atributes
like TES_TYPE becime part if
specialized entty (TESTER).
Aggregation
An ER diagram is not capable of
representing relationship between
an entity and a relationship which
may be required in some scenarios.
In those cases, a relationship with its
corresponding entities is aggregated
into a higher level entity.
For Example, Employee working for
a project may require some
machinery. So, REQUIRE relationship
is needed between relationship
WORKS_FOR and entity MACHINERY.
Using aggregation, WORKS_FOR
relationship with its entities
EMPLOYEE and PROJECT is
aggregated into single entity and
relationship REQUIRE is created
between aggregated entity and
MACHINERY.
Generalization
Generalization is the process of
extracting common properties
from a set of entities and create
a generalized entity from it. It is
a bottom-up approach in which
two or more entities can be
generalized to a higher level
entity if they have some
attributes in common.
For Example,
STUDENT and FACULTY can be
generalized to a higher level
entity called PERSON as shown in
Figure 1. In this case, common
attributes like P_NAME, P_ADD
become part of higher entity
(PERSON) and specialized
attributes like S_FEE become
part of Universityentity
specialized Insttute of Engineering (UIE)
Comparison of Record based
model
Hierarchical Network Relatonal
Relatinship between Relatinship between Relatinship between
recirds is if parent child recirds is expressed in the recirds is represented by a
type. firm if piinters ir links relatin that cintains a key
fir each recird invilved in
the relatinship.
In irder ti represent links In netwirk midel alsi the Relatinal midel dies nit
aming recirds, piinters are recird relatins are physical maintain physical
used. Thus relatins aming cinnectin aming recird.
recirds are physical Data is irganized ligically in
the firm if riws and
cilumns, and stired in
table.
Searching fir recird is very Searching a recird is easy A unique indexed key feld Is
difcult since ine can since there are multple used ti search fir a data
retrieve a child inly afer access paths ti a data element.
giing thriugh its parent elements.
recird
14
University Insttute of Engineering (UIE)
Department if Cimputer Science and Engineering (CSE)
Data Dictionary
It contains information about the data attributes, elements relationship, user
details, security restrictions and integrity constraints.
SQL COMPONENTS
Example:-
Create table STUDENT (Roll_no number(5), Name varchar2(20), Branch
varchar2(10));
Dropping A Column
Alter table <table name> drop column <col name>;
Example:-
Alter table STUDENT add( Telephone number(10));
Alter table STUDENT modify( Telephone number(20));
Alter table STUDENT drop column Telephone;
Example:-
Drop table CSEA_Data101;
INSERT COMMAND
Purpose:- The Insert Into Table command is used to load the created table
with data to be manipulated later.
Example:-
Insert into STUDENT values(101, ‘Aanchal’, ’CSE’);
Insert into STUDENT values(126, ‘Jotnain’, ’CSE’);
Insert into STUDENT values(149, ‘Sapanpreet’, ’ECE’);
Insert into STUDENT values(151, ‘Savita’, ’CSE’);
Example:-
Insert into CSEA_Data101 Select roll_no,name from STUDENT where
roll_no=149;
SELECT COMMAND
Purpose:- This command is used to view all the rows and columns of the
table created in the database.
Example:-
Select * from STUDENT;
SELECT COMMAND
Example:-
Select * from STUDENT where roll_no=151;
ALIAS
Example:-
SELECT CustomerID AS ID, CustomerName AS Customer
FROM Customers;
Example:-
SELECT o.OrderID, o.OrderDate, c.CustomerName
FROM Customers AS c, Orders AS o
WHERE c.CustomerName='Around the
Horn' AND c.CustomerID=o.CustomerID;
DELETE COMMAND
Purpose:- To delete the rows from the table that satisfies the condition
provided by its where clause and returns the number of records deleted.
Example:-
Delete from CSEA_Data101 where rollno=149;
Delete from CSEA_Data101;
DELETE
DELETE is a DML command.
DELETE is executed using a row lock, each row in the table is locked for deletion.
We can use where clause with DELETE to filter & delete specific records.
The DELETE command is used to remove rows from a table based on WHERE
condition.
It maintains the log, so it slower than TRUNCATE.
DROP COMMAND
1. The DROP command removes a table from the
database.
2. All the tables' rows, indexes, and privileges will also
be removed.
3. No DML triggers will be fred.
4. The operation cannot be rolled back.
5. DROP and TRUNCATE are DDL commands, whereas
DELETE is a DML command.
6. DELETE operations can be rolled back (undone),
while DROP and TRUNCATE operations cannot be
rolled back
2. It is used ti delete riws ir recirds 2. It is used ti delete the entre table 2. It is used ti delete the entre
based in cinditins specifed in the aling with its schema and structure recirds if a table withiut afectng
WHERE clause. respectvely. the schema if the table.
UPDATE COMMAND
Purpose:- The Update statement updates columns in the existing table’s
rows with new values. The Set clause indicates which column data should
be modified and the new valued they should hold.
Syntax:-
Updating Specific Records
Update <table name> set <col name1>=<expression1>, <col
name2>=<expression2> where <condition>;
Updating All The Records
Update <table name> set <col name1>=<expression1>, <col
name2>=<expression2>;
Example:-
Update STUDENT set Branch=’ECE’ where roll_no=101;
Update STUDENT set Branch=’CSE’;
FAQ
1.Define DBMS? List Database system Applications.
2. Discuss Database Administrator’s responsibilities.
3. What do you understand by dimension and attribute?
4. What is a fact & a fact table?
5. List out few common mistakes encountered during Data
Modelling?
6. What do you understand by Data Modelling?
7. Explain your understanding of different data models?
References
• OTHER REFRENCES
• ER Diagram: Entity Relationship Diagram Model | DBMS Example (guru99.com)
• ER Diagram Representation - Tutorialspoint
• Entity Relationship Diagram - ER Diagram in DBMS (beginnersbook.com)
• http://nptel.ac.in/courses/Webcourse-contents/IISc-BANG/notused/IISc/New
%20Rajaram%20pdfs/module8.pdf
• http://ecomputernotes.com/fundamental/what-is-a-database/type-of-data-models
• https://beginnersbook.com/2015/04/data-models-in-dbms/
• http://www.odbms.org/wp-
content/uploads/2013/11/Data_Modeling_ConcepttoDBMS.pdf