Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
15 views10 pages

Edited PR-2

The document outlines a practical exercise on creating an Entity Relationship Diagram (ER-Diagram) for a Banking Management System and converting it into a relational schema. It details the objectives, expected outcomes, skills to be developed, and necessary resources for the exercise. Additionally, it includes definitions of key concepts such as entities, attributes, relationships, and various types of relationships in database design.

Uploaded by

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

Edited PR-2

The document outlines a practical exercise on creating an Entity Relationship Diagram (ER-Diagram) for a Banking Management System and converting it into a relational schema. It details the objectives, expected outcomes, skills to be developed, and necessary resources for the exercise. Additionally, it includes definitions of key concepts such as entities, attributes, relationships, and various types of relationships in database design.

Uploaded by

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

Database Management (4331603)

Date: _________________
Practical No.2: Entity Relationship Diagrams
a. Draw ER-Diagram for Banking Management System
b. Convert ER-Diagram to relational schema.

A. Objective:

The objective of converting an ER-Diagram to a relational schema is to create a database


structure that can be implemented in a database management system..

B. Expected Program Outcomes (POs)

Basic and Discipline specific knowledge: Apply knowledge of basic mathematics,


science and engineering fundamentals and engineering specialization to solve the
engineering problems.
Problem analysis: Identify and analyse well-defined engineering problems using
codified standard methods.
Design/ development of solutions: Design solutions for engineering well-defined
technical problems and assist with the design of systems components or processes to
meet specified needs.
Engineering Tools, Experimentation and Testing: Apply modern engineering tools
and appropriate technique to conduct standard tests and measurements.
Project Management: Use engineering management principles individually, as a team
member or a leader to manage projects and effectively communicate about well- defined
engineering activities.
Life-long learning: Ability to analyze individual needs and engage in updating in the
context of technological changes in field of engineering.

C. Expected Skills to be developed based on competency:

“Draw ER-Diagram for Banking Management System and Convert ER-Diagram to


relational schema”

This practical is expected to develop the following skills.


1. Data modelling skills to represent the entities, attributes, and relationships
in a clear and organized way.
2. Ability to think logically and analyse complex systems to identify the
relationships and dependencies between different entities and attributes.

D. Expected Course Outcomes (Cos)

CO2: Design database using Entity relationship approach.


10 | P a g e 236120316032
Database Management (4331603)

E. Practical Outcome (PRo)

Students will be able to create E-R Diagram for any system and its conversion to
relational schema.

F. Expected Affective domain Outcome (ADos)

1) Follow safety practices.


2) Follow Coding standards and practices.
3) Demonstrate working as a leader/ a team member.
4) Follow ethical practices.
5) Maintain tools and equipment.

G. Prerequisite Theory:

Entity A real-world object or concept that has a unique identity and can be
distinguished from other objects or concepts in the system.

Consider an organization as an example- manager, product,


employee, department etc. can be taken as an entity.

Attributes Characteristics or properties of an entity that describe its features,


such as name, address, age, or gender.

For example, id, age, contact number, name, etc. can be attributes of a
student.

11 | P a g e 236120316032
Database Management (4331603)

Relationship An association between two or more entities that represents a


meaningful connection or interaction, such as "works for", "is a part
of", or "belongs to".

Diamond or rhombus is used to represent the relationship.

Primary key A unique identifier for an entity that is used to ensure its uniqueness
and enable efficient data retrieval, such as an employee ID or a
customer account number. Primary key is represented by and ellipse
with the text underlined.

Foreign key A field in one table that refers to the primary key of another table,
creating a relationship between the two tables and enabling data
retrieval and manipulation.

Super key A combination of one or more attributes that uniquely identifies an


entity in a table, such as a customer's name and account number.

Candidate key A minimal super key that uniquely identifies an entity, meaning that
it cannot be further reduced without losing its uniqueness.

Weak entity An entity set that cannot be uniquely identified by its own attributes
set alone, but depends on a related entity set and a partial key, called a
discriminator.
An attribute that composed of many other attributes is known as a
Composite composite attribute. The composite attribute is represented by an
12 | P a g e 236120316032
Database Management (4331603)

Attribute ellipse, and those ellipses are connected with an ellipse.

An attribute can have more than one value. These attributes are
Multivalued known as a multivalued attribute. The double oval is used to
Attribute represent multivalued attribute.

For example, a student can have more than one phone number.

An attribute that can be derived from another attribute is known as a


Derived derived attribute. It can be represented by a dashed ellipse.
Attribute
For example, A person's age changes over time and can be derived
from another attribute like Date of birth.

13 | P a g e 236120316032
Database Management (4331603)

Sub class & Superclass

Superclass

A general entity type that has one or more specialized entity types that inherit
its attributes and relationships.

Subclass

A specialized entity type that inherits attributes and relationships from a


superclass and may also have its own unique attributes and relationships.

In object-oriented programming and database design, a subclass is a type of


entity that is more specific than a superclass. The subclass inherits the attributes and
relationships of the superclass, but it may also have its own additional attributes and
relationships. The superclass is a more general entity type that defines common
attributes and relationships that are shared by all its subclasses. Subclasses are used to
represent more specific types of entities, such as different types of vehicles (car, truck,
motorcycle) that share common attributes and relationships (e.g., make, model, year,
manufacturer), but also have their own unique features and characteristics.

Types of Relationships

a. One-to-One Relationship

When only one instance of an entity is associated with the relationship,


then it is known as one to one relationship. For example, A female can marry to
one male, and a male can marry to one female.

b. One-to-many relationship

When only one instance of the entity on the left, and more than one
instance of an entity on the right associates with the relationship then this is
known as a one-to-many relationship. For example, Scientist can invent many
inventions, but the invention is done by the only specific scientist.

14 | P a g e 236120316032
Database Management (4331603)

c. Many-to-one relationship

When more than one instance of the entity on the left, and only one
instance of an entity on the right associates with the relationship then it is
known as a many-to-one relationship. For example, Student enrolls for only one
course, but a course can have many students.

d. Many-to-many relationship

When more than one instance of the entity on the left, and more than
one instance of an entity on the right associates with the relationship then it is
known as a many-to-many relationship. For example, Employee can assign by
many projects and project can have many employees.

Generalization

As mentioned above, the process of generalizing entities, where the generalized


entities contain the properties of all the generalized entities, is called generalization. In
generalization, a number of entities are brought together into one generalized entity
based on their similar characteristics. For example, pigeon, house sparrow, crow and
dove can all be generalized as Birds.

15 | P a g e 236120316032
Database Management (4331603)

Specialization

Specialization is the opposite of generalization. In specialization, a group of


entities is divided into sub-groups based on their characteristics. Take a group ‘Person’
for example. A person has name, date of birth, gender, etc. These properties are
common in all persons, human beings. But in a company, persons can be identified as
employee, employer, customer, or vendor, based on what role they play in the
company.

Similarly, in a school database, persons can be specialized as teacher, student,


or a staff, based on what role they play in school as entities.

Inheritance

We use all the above features of ER-Model in order to create classes of objects
in object-oriented programming. The details of entities are generally hidden from the
user; this process known as abstraction.

Inheritance is an important feature of Generalization and Specialization. It


allows lower-level entities to inherit the attributes of higher-level entities.

16 | P a g e 236120316032
Database Management (4331603)

For example, the attributes of a Person class such as name, age, and
gender can be inherited by lower-level entities such as Student or Teacher.

H. Resources/Equipment Required

Sr. Instrument/Equipment/
No. Components/Trainer kit Specification Quantity

Hardware: Computer Computer (i3-i5 preferable), RAM minimum


1
System 2 GB and onwards
2 As Per
Operating System Windows/ Linux
Batch
3 Software Oracle Size

Notepad, Notepad++, Sublime Text or


4 Text Editor
similar

I. Safety and necessary Precautions followed

NA

17 | P a g e 236120316032
Database Management (4331603)

J. Source code:

a. ER-Diagram for Banking Management System

a. ER-Diagram to relational schema:


1. Branch (BID(PK), Bcode, Location, Total_Employee)
2. Customer (AccountNo(PK), AccountName, Balance, Address,
Password, BID(FK))
3. Employee(EID(PK), Ename, Salary, Designation, Weekoff,
Pasword, BID(FK))
4. Transaction(Deposit, Withdraw, AccountNo(FK))

K. Practical related Quiz.


1) What does ER stand for?
✓ a) Entity Relationship b) Enterprise Resource
c) External Representation d) Exception Reporting

18 | P a g e 236120316032
Database Management (4331603)

2) What is a cardinality?
a) Attribute type b) Entity type
✓ c) Relationship type d) Primary key

3) What is an attribute?
✓ a) Column name b) Primary key
c) Foreign key d) Data type

4) What is a candidate key?


✓ a) Unique identifier b) Alternate key
c) Primary key d) Foreign key

5) What is a referential integrity?


✓ a) Database property b) Data validation
c) Primary key d) Attribute type

L. References / Suggestions
https://www.w3schools.com/sql/default.asp
https://www.tutorialspoint.com/dbms/
https://www.geeksforgeeks.org/dbms/

M. Assessment-Rubrics

Faculty
Marks Obtained Date
Signature
Program Implementation Student’s engagement
Correctness and Presentation in practical activities Total
(4) Methodology (3) (3) (10)
R1 R2 R3

19 | P a g e 236120316032

You might also like