0% found this document useful (0 votes)
32 views14 pages

Unit 1

The document outlines a syllabus for a course on Relational Database Management Systems at Vivekananda Vision Arts and Science College. It covers key topics such as the introduction to DBMS, relational models, SQL, PL/SQL, and the Entity-Relationship model. The document also includes detailed explanations of concepts like data independence, database architecture, and various types of database users and attributes.

Uploaded by

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

Unit 1

The document outlines a syllabus for a course on Relational Database Management Systems at Vivekananda Vision Arts and Science College. It covers key topics such as the introduction to DBMS, relational models, SQL, PL/SQL, and the Entity-Relationship model. The document also includes detailed explanations of concepts like data independence, database architecture, and various types of database users and attributes.

Uploaded by

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

NOTES OF

LESSON
VIVEKANANDA VISION ARTS AND SCIENCE COLLEGE
Kachur Uthukottai, Thiruvallur-602026

RELATIONAL DATABASE MANAGEMENT SYSTEM


Semester – V
University of Madras
By
Mr. Dhanesh P T
CORE-XI: RELATIONAL DATABASE MANAGEMENT SYSTEM
Syllabus
UNIT – I
Introduction to DBMS– Data and Information - Database – Database Management System –
Objectives - Advantages – Components - Architecture. ER Model: Building blocks of ER Diagram –
Relationship Degree – Classification – ER diagram to Tables – ISA relationship – Constraints –
Aggregation and Composition – Advantages
UNIT - II
Relational Model: CODD’s Rule- Relational Data Model - Key - Integrity – Relational Algebra
Operations – Advantages and limitations – Relational Calculus – Domain Relational Calculus - QBE.
UNIT - III
Structure of Relational Database. Introduction to Relational Database Design - Objectives – Tools –
Redundancy and Data Anomaly – Functional Dependency - Normalization – 1NF – 2NF – 3NF – BCNF.
Transaction Processing – Database Security.
UNIT –IV
SQL: Commands – Data types – DDL - Selection, Projection, Join and Set Operations – Aggregate
Functions – DML – Modification - Truncation - Constraints – Subquery.
UNIT - V
PL/SQL: Structure - Elements – Operators Precedence – Control Structure – Iterative Control - Cursors
- Procedure - Function - Packages – Exceptional Handling - Triggers.

UNIT - I
Introduction to DBMS– Data and Information - Database – Database Management System – Objectives -
Advantages – Components - Architecture. ER Model: Building blocks of ER Diagram – Relationship Degree –
Classification – ER diagram to Tables – ISA relationship – Constraints – Aggregation and Composition –
Advantages

Introduction
Data is a very important resource of every organization. Every institution or every person come
across huge amount of data by day. So in order to handle these large and complex data, an efficient
tool is needed. That tool is DBMS.
Distinguish between data and information
Data
• Raw facts about person, place, thing or any object are called data.
• It gives implicit meaning only.
• Example: Raju 42 22 64
Information
• Processed or organized data are called information.Example:
Name External mark Internal mark Total

Raju 42 22 64

Define database. Give some examples


Database is a collection of inter related data
Example: company database, university database, hospital database etc
What is DBMS?
DBMS stands for Database Management System. DBMS consist of collection of inter related data and
a set of programs to access that data. The set of programs can be used to perform various operations
such as storing, retrieval, updating and deleting data.
Example: MySql, Oracle, Microsoft SQL server etc
List the objectives of DBMS
• Data availability: - data should be available into users and application programmers in an
understandable format
• Data integrity:-data should be complete, correct and consistent
• Data security:- data should be available to authorized users only
• Data independence:- changes at one level should not affect other levels.
What are the different components of DBMS?
• Hardware :- server computers, hard disks, network devices etc
• Software:- DBMS,OS, Application programs etc
• Data:- Database contains operational data and meta data(data about data)
• Users:- DBA, Application programmer, Sophisticated users, Naive users
What are the disadvantages of file processing system?
• Data redundancy: - storing same data at multiple places is called data redundancy
• Data inconsistency: - Various copies of the same data shows different values is called data
inconsistency. Data redundancy may results inconsistency.
• Limited security:- file processing system offers only limited security
• Data integrity issues:- there is no mechanism to ensure overall correctness of data
• Difficulty in accessing data:- there is no mechanism to access data efficiently

List the advantages of dbms over file processing system


• Controlling data redundancy: Storing of same data in multiple locations is called data
redundancy. DBMS control this redundancy.
• Prevent data inconsistency: Various copies of the same data shows different values is called
data inconsistency. It is prevented in DBMS.
• Efficient data access: DBMS has variety of techniques to store and retrieve data efficiently.
• Data integrity: It refers to overall correctness of data. DBMS provide several rules to ensure
data integrity.
• Data security: It refers to protecting data from disclosure and modification from
unauthorized persons. DBMS ensure security
• Sharing of data: Using DBMS different users and different programs can share same database
simultaneously.
• Crash recovery: DBMS has mechanism to recover data from crashes.

Explain different types of database users


• Database Administrator (DBA):- The person who has the overall control and responsibility of
the database. DBA is responsible for
• Design the conceptual and physical schema
• Data availability and recovery from failures
• Security and authorization
• Application programmers:- They are computer professionals who interact with the
database through application program( written in java python php etc).
• Sophisticated users: -They are expert user having deep knowledge in DBMS.Eg: Scientist,
engineers etc.
• Naive users:- ordinary users they access database through application programs.
What is data independence? Explain different types of data independence
Ability to change scheme at one level without affecting the schema at another level is called data
independence.
There are two types of data independence.
i. logical data independence
ii. physical data independence
Logical data independence
Ability to change scheme at logical level without affecting the schema at view(external) level
is called logical data independence.
Physical data independence
Ability to change scheme at physical level without affecting the schema at logical(conceptual)
level is called physical data independence.

Explain the classification of Database languages


Database language statements (commands) classified into three groups
They are
• Data definition language(DDL)
• Data manipulation language(DML)
• Data control language(DCL)
DDL(Data definition language)
• DDL commands works on the schema(structure) of the database
• They are used to create, modify and remove database objects such as tables, views and
indexes.
• Commands used are CREATE, ALTER and DROP
DML(Data Manipulation Language)
• DML commands are used to manipulate the database
• They are used to insert data, retrieve data, modify data and delete data
• Commands used are INSERT, SELECT, UPDATE and DELETE
DCL(Data Control Language)
• DCL commands are used to control access to the database
• Commands used are GRAND and REVOKE
Explain different database architecture used
There are mainly three types of database architecture used. They are
• Single tier architecture
• Two tier architecture
• Three tier architecture
Single tier architecture
• In this architecture user interface, application logic and database all reside on the same
machine
• This architecture is seen in local desktop applications
• eg: small application like class time table, tc generating system , note keeping app etc
Two tier architecture
• It is also known as client-server architecture
• Here two layers are there, client layer and server layer
• user interface resides on client computer
• application logic and database storage reside on server
• Example eg: hotel reservation system, student attendance system
Three tier architecture
• Here there are three layers. presentation layer, application layer and database layer
• Presentation layer handles user interface
• Application layer handles application logic
• Database layer handles database storage
• Example Amazon website, Youtube web site

Write a short note on Entity-Relationship(ER)Model


● It is introduced by Computer scientist Mr. Peter Pin Shan Chan in 1976.
● It design the structure of a database
● ER model is a conceptual data model used in database design
● It focus on what are the entities and how they are related.
● It simplify the complexity of a database system
What is ER diagram? What are the symbols used to create ER diagram? Explain its main
components.
An E-R diagram is a visual representation of entities and the relationship between the entities. It is an
effective communication tool among users, database designers and application programmers
Geometric shapes(symbols) and their meaning is given below:
Components of ER diagram
The three main components of Entity-Relationship Diagram
1. Entities
2. Attributes
3. Relationships
1. Entities
Entity belongs to the real-world elements i.e., it may be any object, person or place. An entity can be
represented using rectangle. Example student, employee, book etc
An Entity set is a set of entities of the same type.
2. Attributes
An attribute describes the properties or characteristics of an entity. Eclipse is used to represent an
attribute. Eg: rollno, name of student
3. Relationship
The association among entities is called a relationship. For example, a student enrols in a course, an
employee works in a department. Here, enrols and works in are called relationships. It is
represented by diamond shape.

What is Relationship Degree? Explain its different types.


A relationship degree indicates the number of entities associated with a relationship.
There are three types in degree of relationships. They are:
1. Unary relationship
2. Binary relationship
3. Ternary relationship
1. Unary relationship
In unary relationship, both participating entity sets are the same. It is also called recursive
relationship and having the degree 1.

2. Binary relationship
A binary relationship exists when there are two different entities participating in the relationship. Its
degree is two.

3. Ternary relationship
A ternary relationship exists when there are three different entities participating in the relationship
and having the degree 3.
Distinguish Strong Entity and weak entity
Strong Entity
● An entity which can exist alone
● It doesn't depend other entities
● It is represented by a single rectangle
Weak Entity
● An entity which cannot exist alone
● It depends other strong entity.
● It is represented by a double lined rectangle.

Explain different types of attributes


Attribute can be classified in the following types. They are
1 Key attribute
2 Composite attribute
3. Multi-valued attribute
4. Derived attribute
1 Key attribute
A key attribute can uniquely identify an entity from an entity set. For example, student regno can
uniquely identify a student from a group of students.
2 Composite attribute
A composite attribute is an attribute that consists of several other attributes. For example, in student
entity, the address of the student is a composite which composed of other attributes such as pincode,
state, country etc.
3. Multi-valued attribute
An attribute that contains more than one value is called multi-valued attribute. For example, a
student can have more than one phone numbers.
4. Derived attribute
A derived attribute is one that can be derived from another attributes and it is dynamic manner. For
example, age is a derived attribute. it is derived from date of birth.
Explain different mapping cardinalities or Cardinality ratio in details
Cardinality ratio is the ratio between number of entities participated in one entity type and number
of entities participated in another entity type.
It is classified into 4
1. One to One (1:1)
2. One to Many (1:M)
3. One to Many (1:M)
4. Many to Many (M:N)

1. One to One (1:1) Mapping


When a single instance of an entity is associated with a single instance of another entity then it is
called one to one relationship

.
2. One to Many (1:M) Mapping
When a single instance of an entity is associated with more than one instances of other entity then it
is called one to many relationships.

3. Many to one (M:1) Mapping


When more than one instances of an entity is associated with single instance of instance of another
entity then it is called many to one relationships.
4. Many to Many Mapping
When more than one instances of an entity type is associated with more than one instances of
another entity type then it is called many to many relationships.

What is the difference between Total Participation and Partial Participation


Total Participation
When each entity in an entity set participate in a relation, it is called total participation
It is represented by double line
Partial Participation
When all entities in a given entity set do not participate in a relation, it is called partial participation.
It is represented by single line

How ER Diagram is converted into tables?. Explain in detail.


1. Conversion of Strong Entity sets with simple attributes into table
● The strong entity set becomes the table
● The attributes of the entity set becomes the table attributes.
● The key attribute of the entity set becomes the primary key of the table.
2. Conversion of Strong Entity sets with composite attributes into table
● The entity set will becomes the table
● simple attributes of the composite will become the attributes of the table.
● The composite attribute itself will be ignored during conversion.

3. Conversion of Strong Entity set with Multi-valued attributes into table


● Entity set with multi-valued attributes will require two tables.
● Second table will contain key attribute and multivalued attribute

4. Conversion of relationship set into table


● The primary attributes of the two entity sets becomes the table attributes
● If the relationship set has any attribute that also becomes the attribute of the table.

Write a short note on ISA relationship


The ISA relationship is used to represent generalization and specialization in an ER diagram.
Generalization
Generalization is the process of forming a higher level entity from two or more entities of lower level
(if they have some common attributes)i.e Superclass is formed from subclasses. It is a bottom-up
approach.
For example, Faculty and student entities can be generalized to form a higher level entity Person.
Specialization
Specialization is the process of broken down one higher level entity into two lower-level entities.. For
example employee entity can be specialized into tester and developer entities based on what role
they play in the company.
Define the terms aggregation and composition.
Aggregation is the ‘has a’ relationship between two entities. Deleting the main entity cannot delete
its sub part.
Eg Playlist and Song relation
Composition is the ‘part of a’ relationship between two entities. Deleting the main entity delete its
sub part entity also.
Eg: Post and comments
List the advantages of entity-relationship model
Conceptual Simplicity - It shows the pictorial representation of relationships between entities and
attributes.
Explicit Visual Representations The database design can be easily comprehended after consulting the
diagram
Communication Effectiveness - Standard symbols representing different information facilitate
understanding of the working of the database after completion.
Immense Flexibility ER data model can be easily converted into any other data model with minor
manipulations.

You might also like