0% found this document useful (0 votes)
8 views3 pages

Task ER

The document explains the concepts of Entity-Relationship Diagrams (ERDs), detailing entities, attributes, cardinality, primary keys, and foreign keys in database design. It also outlines assumptions and business rules related to resident management in a facility, emphasizing the responsibilities of residents, care managers, and maintenance staff. Key relationships and constraints are defined to ensure proper management and care for residents.
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)
8 views3 pages

Task ER

The document explains the concepts of Entity-Relationship Diagrams (ERDs), detailing entities, attributes, cardinality, primary keys, and foreign keys in database design. It also outlines assumptions and business rules related to resident management in a facility, emphasizing the responsibilities of residents, care managers, and maintenance staff. Key relationships and constraints are defined to ensure proper management and care for residents.
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/ 3

Entity-Relationship Diagram (ERD):

The E-R diagram is based on a perception of real world that consist of a collection of
basic objects called entities and relationship among these objects. In an E-R
diagram, a database can be modelled as a collection of entities, and relationship
among entities.

Entity:

An entity is an object that exists and is distinguishable from other objects. An entity
may be has a set of properties and the values for some set of properties which
uniquely identifies an entity.

For example: specific person, specific company, event, a particular plant etc. The
entities have attributes, for example people have names and addresses.

Attributes:

The properties or characteristics of an entity are called attributes. For example, a


customer entity can have customer-id, customer-name, customer-street, and
customer-city as attributes.

Cardinality:

Cardinality refers to the number of distinct values in a column or set of columns in a


table. It is an important concept in database design as it helps in determining the
relationships between tables and the optimal way to join them.

Mapping Cardinality Constraints:

Mapping cardinality or cardinality ratio express the number of entities to which


another entity can be associated via a relationship set. The mapping cardinality is
most useful in describing binary relationship sets. (Mapping cardinality also used for
other relationship that is ternary etc.) For a binary relationship set the mapping
cardinality must be one of the following types:

 One-to- one
 One-to- many
 Many-to-one
 Many-to-many
1. One-to-One:

An entity in A is associated with at most one entity in B, and an entity in B is


associated with at most one entity in A.

2. One-to-Many:

An entity in A is associated with any number (zero or more) of entities in B. An entity


in B however can be associated with at most one entity in A.

3. Many-to-One:

An entity in A is associated with at most one entity in B. An entity in B, however, can


be associated with any number (zero or more) of entities in A.

4. Many-to-Many:

An entity in A is associated with any number (zero or more) of entities in B, and an


entity in B is associated with any number (zero or more) of entities in A.

Primary key:

A primary key is a unique identifier that is used to uniquely identify each record or
row in a database table. It is a field or a combination of fields that have a unique
value for each record, and this value cannot be null or empty.

Typically, a primary key is created by selecting a column or a combination of


columns that uniquely identify each row in a table.

Foreign Key:

A foreign key is a field or a combination of fields in a database table that refers to the
primary key of another table. It is used to establish a relationship between two tables
in a database. The table that contains the foreign key is called the "referencing"
table, and the table that contains the primary key is called the "referenced" table.
Foreign keys can be used to create many types of relationships between tables,
including one-to-one, one-to-many, and many-to-many relationships.
Assumptions and Business Rules:

Assumption:

 Each resident can only occupy one room at a time and a resident can only
apply for a room if there is a room available in the facility.
 A resident can only select a room that is appropriate for their level of care
where each room can only be managed by one care manager at a time.
 The maintenance employees are trained and qualified to perform the
necessary maintenance tasks.

Business Rules:

 A resident must pay the daily rental rate for their room in advance.
 A resident's contract end date can be extended if they choose to continue
living in the facility.
 The care manager is responsible for creating a care plan for each resident.
 The care type for a resident must be appropriate for their level of care needs.
 Staff members must follow the care plan created by the care manager for
each resident.
 Maintenance tasks must be scheduled and performed in a timely manner to
ensure the safety and comfort of the residents.
 Any changes to a resident's contract or care plan must be approved by the
care manager.
 The availability date for a room must be updated in the system when a room
becomes available or when a resident moves out.
 Staff members must report any concerns or issues with a resident's health or
well-being to the care manager immediately.
 Maintenance employees must document all maintenance tasks performed
and any issues found during inspections.

You might also like