Task ER
Task ER
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:
Cardinality:
One-to- one
One-to- many
Many-to-one
Many-to-many
1. One-to-One:
2. One-to-Many:
3. Many-to-One:
4. Many-to-Many:
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.
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.