0% found this document useful (0 votes)
198 views9 pages

EER Diagram Assignment for Database Systems

This document outlines the details for two group assignments in the Database Systems course (CC-230) taught by Ms. Rida Ayesha. The assignments require students to design ER and EER diagrams based on specified scenarios, with strict guidelines on submission format and originality. Each assignment includes multiple questions that focus on different case studies related to database design.

Uploaded by

cindrella23401
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)
198 views9 pages

EER Diagram Assignment for Database Systems

This document outlines the details for two group assignments in the Database Systems course (CC-230) taught by Ms. Rida Ayesha. The assignments require students to design ER and EER diagrams based on specified scenarios, with strict guidelines on submission format and originality. Each assignment includes multiple questions that focus on different case studies related to database design.

Uploaded by

cindrella23401
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

Course Title: Database Systems

Course Code: CC-230


Instructor: Ms. Rida Ayesha

ASSIGNMENT # 02 (Solution)
Note:

• This is a group assignment. (Members allowed = 02)


• Assignment should be submitted in hard copy (hand written).
• Follow the deadline strictly on LMS.
• Follow the sample title page for your assignment submission.
• Copied assignments will result in a zero!

Design the ER diagram for the following scenarios/case studies (using Chen or Crow’s
Foot Notation).
Note: You can make assumptions or modifications where required using your common sense!

Question # 1:

Solution:
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 2:

Solution:
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 3:

Solution:
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 4:

Solution:
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 5:

Solution:
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha
ASSIGNMENT # 03 (Solution)
Note:

• This is a group assignment. (Members allowed = 02)


• Assignment should be submitted in hard copy (hand written).
• Follow the deadline strictly on LMS.
• Follow the sample title page for your assignment submission.
• Copied assignments will result in a zero!

Design the EER diagram for the following scenarios/case studies.


Note: You can make assumptions or modifications where required using your common sense!
Question # 1:
At a weekend retreat, the entity type PERSON has three subtypes: CAMPER, BIKER, and
RUNNER. Draw a separate EER diagram segment for each of the following situations:
• At a given time, a person must be exactly one of these subtypes.
• A person may or may not be one of these subtypes. However, a person who is one of
these subtypes cannot at the same time be one of the other subtypes.
• A person may or may not be one of these subtypes. On the other hand, a person may
be any two (or even three) of these subtypes at the same time.
• At a given time, a person must be at least one of these subtypes.
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 2:
A bank has three types of accounts: checking, savings, and loan. Following are the attributes
for each type of account:
• CHECKING: Acct No, Date Opened, Balance, Service Charge
• SAVINGS: Acct No, Date Opened Balance, Interest Rate
• LOAN: Acct No, Date Opened, Balance, Interest Rate, Payment

Assume that each bank account must be a member of exactly one of these subtypes. Using
generalization, develop an EER model segment to represent this situation using the traditional
EER notation.
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 3:
Develop an EER model for the following situation, using the traditional EER subtypes inside
supertypes notation, as specified by your instructor: A person may be employed by one or
more organizations, and each organization may be the employer of one or more persons. An
organization can be an internal organizational unit or an external organization. For persons
and organizations, we want to know their ID, name, address, and phone number. For persons,
we want to know their birth date, and for organizations, we want to know their budget
number. Employee can be permanent employee or may be a part time job holder but at the
same time a person can be both. For permeant they have extra bonus and credit while for part
time job older we keep their extra hours. For each employment, we want to know the
employment date, termination date, and bonus. Employment of a person by an organization
may result in the person holding many positions over time. For each position, we want to
know its title, and each time someone holds that position, we need to know the start date and
termination date and salary. An organization is responsible for each position. It is possible for
a person to be employed by one organization and hold a position for which another
organization is responsible.
Course Title: Database Systems
Course Code: CC-230
Instructor: Ms. Rida Ayesha

Question # 4:
Draw an EER diagram for the following description of a law firm: Each case handled by the
firm has a unique case number; a date opened, date closed, and judgment description are also
kept on each case. A case is brought by one or more plaintiffs, and the same plaintiff may be
involved in many cases. A plaintiff has a requested judgment characteristic. A case is against
one or more defendants and the same defendant may be involved in many cases. A plaintiff
or defendant may be a person or an organization. Over time, the same person or organization
may be a defendant or a plaintiff in cases. In either situation, such legal entities are identified
by an entity number, and other attributes are name and net worth.

Common questions

Powered by AI

When modeling entities like PERSON with subtypes CAMPER, BIKER, and RUNNER, several distinguishing design requirements must be considered. If a person can only be one subtype at a time, mutually exclusive constraints must be applied. Conversely, if a person can simultaneously be of multiple subtypes, the design allows for overlapping subtype participation. This could involve using a partial participation constraint where each subtype is a separate component of the entity's overall type, effectively creating a union of all potential roles a person can assume .

In the traditional EER model, plaintiffs and defendants in legal cases are captured through several relationships. Each case is uniquely identified by a case number, with attributes such as date opened, date closed, and judgment description. Plaintiffs, who can be either individuals or organizations, are associated with one or more cases and can request a judgment characteristic. Similarly, defendants also involve attributes like entity number, name, and net worth. Both plaintiffs and defendants may be engaged in multiple cases, allowing complex many-to-many relationships to be represented between legal entities and cases .

Handwritten submissions are emphasized to ensure authenticity and reduce plagiarism. This method complies with academic integrity policies by making copying more challenging, as every group member must contribute manually to the assignment. Additionally, it aligns submissions with traditional examination methods, reinforcing handwriting skills that are often underused in digital-centric environments .

The EER model for a law firm accommodates role changes by allowing plaintiffs and defendants to be modeled as flexible, temporal entities with attributes such as entity number, name, and net worth shared between these roles. It supports dynamic role allocation: a person or organization can shift between being a plaintiff or defendant over time, reflecting real-life legal dynamics. This adaptability is managed through a detailed relationship model that includes case associations and historical tracking of role-specific traits such as requested or actualized judgments .

In an EER diagram, the relationship between persons and organizations is represented using the traditional EER subtypes-inside-supertypes notation. A person, identified by attributes like ID, name, and birth date, may have multiple employment relationships with organizations, which are also identified by their ID, name, and a budget number. The employment relationship includes details like employment date, termination date, and bonus. Positions within an organization are tracked, including title, start and termination dates, and salary. A person can have different roles in the organization, which are managed under this employment scenario .

Mandatory subtype membership in a bank account EER model ensures clarity and robustness in system design by preventing ambiguous or undefined states (i.e., an account not being associated with any specific type). While this enforces structure and reduces errors related to atypical account types, it may challenge situations where flexibility is needed, such as hybrid or new financial products that do not fit neatly into existing categories .

Allowing position responsibilities to be held by different organizations in one employment scenario implies flexibility in managing organizational roles and responsibilities. This reflects real-world situations where a position within one organization might be strategically managed or funded by another organization. This structure requires careful handling of position attributes such as title, start and end dates, and salary, to accurately record and reflect the differing responsibilities and potential overlap in organizational management .

For the banking system scenario, the EER model utilizes generalization to distinguish account types such as CHECKING, SAVINGS, and LOAN under a common account entity type. Key attributes include Acct No, Date Opened, and Balance for all account types. Additional attributes differ, such as Service Charge for CHECKING accounts, Interest Rate for SAVINGS, and both Interest Rate and Payment for LOAN accounts. This ensures each bank account is classified as exactly one of these types .

The use of generalization in modeling bank accounts enhances data integrity by consolidating common attributes across account types, such as Acct No, Date Opened, and Balance, into a single supertype. This reduces redundancy and potential inconsistencies, as each account is constrained to inherit from this unified set of attributes, ensuring that all accounts maintain standard data structures while allowing subtype-specific information to be appended as needed .

When designing an EER diagram for a scenario where a person holds multiple simultaneous employment roles, considerations include the flexibility to model overlapping employment and the complexity of capturing multiple, separate employment attributes (e.g., start date, termination date, salary) per position. Care must be taken to ensure that relationships accurately reflect the potential concurrency of roles and the association with potentially different organizations. This requires a robust entity and relationship framework that can track multi-dimensional employment attributes separately for each role without redundancy .

You might also like