Assignment 3: Name: Bhavika Milan Purav Roll No: 211071902 Subject: Software Engineering 2 Aim
Assignment 3: Name: Bhavika Milan Purav Roll No: 211071902 Subject: Software Engineering 2 Aim
1)The latest cab services agency in the city has approached you to develop a Cab
Management System for them. They would be using this software to efficiently manage and
track different cabs that are operated by them.
Cabs are solely owned by the agency. They hire people in contracts to drive the cabs. A cab
can be uniquely identified by, like any other vehicle in the country, its license plate. A few
different categories of cars are available from different manufacturers. And a few of them are
AC cars.
Cab drivers are given a identification card while joining. The ID card contains his name,
permanent address, phone number, date of joining, duration of contract. Also, an unique
alphanumeric code is assigned to each number.
The agency provides service from 8 AM to 8 PM. Whenever any passenger books a cab, an
available cab is allocated for him. The booking receipt given to the passenger contains the car
#, source and destination places. Once he reaches the destination, he signs on a duplicate
copy of the receipt and gives back to the driver. Driver must submit this duplicate copy
signed by the passenger at the agency for confirmation.
To evaluate their quality of service, the agency also wants a (optional) customer satisfaction
survey, where passengers can provide feedback about their journey through the agency's
website.
Theory :-
An Entity Relationship Diagram (ER Diagram) pictorially explains the relationship between
entities to be stored in a database. Fundamentally, the ER Diagram is a structural design of
the database. It acts as a framework created with specialized symbols for the purpose of
defining the relationship between the database entities. ER diagram is created based on three
principal components: entities, attributes, and relationships.
1. Entity:
An entity may be any object, class, person or place. In the ER diagram, an entity can be
represented as rectangles.
Consider an organization as an example- manager, product, employee, department etc. can be
taken as an entity.
a. Weak Entity
An entity that depends on another entity called a weak entity. The weak entity doesn't contain
any key attribute of its own. The weak entity is represented by a double rectangle.
2. Attribute
The attribute is used to describe the property of an entity. Eclipse is used to represent an
attribute.
For example, id, age, contact number, name, etc. can be attributes of a student.
a. Key Attribute
The key attribute is used to represent the main characteristics of an entity. It represents a
primary key. The key attribute is represented by an ellipse with the text underlined.
b. Composite Attribute
An attribute that composed of many other attributes is known as a composite attribute. The
composite attribute is represented by an ellipse, and those ellipses are connected with an
ellipse.
c. Multivalued Attribute
An attribute can have more than one value. These attributes are known as a multivalued
attribute. The double oval is used to represent multivalued attribute.
For example, a student can have more than one phone number.
d. Derived Attribute
An attribute that can be derived from other attribute is known as a derived attribute. It can be
represented by a dashed ellipse.
For example, A person's age changes over time and can be derived from another attribute
like Date of birth.
3. Relationship
A relationship is used to describe the relation between entities. Diamond or rhombus is used
to represent the relationship.
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.
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.
ER Diagrams :