0% found this document useful (0 votes)
426 views7 pages

Database Design for University Records

The document describes an assignment to develop a database system for a university to track student registration and accommodation records. It includes identifying the main entity types and relationship types from the description. The relationships include multiplicity and assumptions about the data. An ER diagram is to be created to represent the data requirements.

Uploaded by

Ali Abu
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)
426 views7 pages

Database Design for University Records

The document describes an assignment to develop a database system for a university to track student registration and accommodation records. It includes identifying the main entity types and relationship types from the description. The relationships include multiplicity and assumptions about the data. An ER diagram is to be created to represent the data requirements.

Uploaded by

Ali Abu
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

DATA MANAGEMENT

MIT 7033

Assignment 2

By:

AHMAD DAUD BIN AHMAD FAUZI S16100213


KHALIL RAHIME BIN KHAIRI S16100201
AINI ZAHIRAH BINTI MOHD SAH S16100212

12.11
Assume you have been contracted by a university to develop a database system to keep track of
student registration and accommodation records. The university courses are offered by faculties.
Depending on the student’s IQ, there is no limitation to how many courses a student can enrol in.
the faculties are not responsible for student accommodation. The university owns a number of
hostels and each student is given a shared room key after enrolment. Each room has furniture
attached to it.
a. Identify the main entity types for the project.
b. Identify the main relationship types and specify the multiplicity for each relationship. State
any assumptions that you make about the data.
c. Using your answers for (a) and (b), draw a single ER Diagram to represent the data
requirements for the project.

Answers:-

12.13
Create an ER Model for each of the following description:-
a) A large organization has several parking lots, which are used by stuff.
b) Each parking lot has a unique name, location, capacity, and number of floors (where
appropriates).
c) Each parking lot has parking spaces, which are uniquely identified using a space number.
d) Members of staff can request the sole use of a single parking space. Each member of staff
has a unique number, name, telephone extension number, and vehicle license number.
e) Represent all the ER models described in parts (a), (b), (c), and (d) as a single ER model.
Provide any assumptions necessary to support your model.

Answer:-

Staff Uses Space Provides ParkingLot


StaffNo {Pk} 0…1 0…1 SpaceNo {Pk} 1…* 1…1 parkingLotName
Name {Pk}
ExtNo location
vehLicNo capacity
NoFloor

12.14
Create an ER model to represent the data used by the library.
The library provides books to borrowers. Each book is described by title, edition, and year of
publication, and is uniquely identified using the ISBN. Each borrower is described by his or her
name and address and is uniquely identified using a borrower number. The library provides one or
more copies of each book and each copy is uniquely identified using a copy number, status
indicating if the book is available for loan, and the allowable loan period for a given copy. A
borrower may loan one or many books, and the date each book is loaned out and is returned is
recorded. Loan number uniquely identifies each book loan.

Answer:-
Provides
Book Book Copy
1..1 1..*
ISBN {Pk}
CopyNo {Pk}
Title
status
Edition
loanPeriod
yearPublished
1..1
Is
1…*

Borrower Borrows Book Loan


1..1 1…*
borrowerNo {Pk} LoanNo {Pk}
name dateOut
address dateReturned

14.4

Examine the Patient Medication Form for the Wellmeadows Hospital case study (see Appendix B)
shown in Figure 14.18.

a) Identify the functional dependencies represented by the attributes shown in the form in
Figure 14.18. State any assumptions that you make about the data and the attributes shown in
this form.
- patientNo → fullName
- wardNo → wardName
- wardName → wardNo
- drugNo → name, description, dosage, methodOfAdmin
- patientNo, drugNo, startDate → unitsPerDay, finishDate
- The bedNo functional dependencies are unclear. If bedNo was a unique number for the
entire hospital, then could say that bedNo → wardNo. However, bedNO is to do with the
allocation of patients on the waiting list to beds.
b) Describe and illustrate the process of normalizing the attributes shown in Figure 14.18 to
produce a set of well-designed 3NF relations.
- First Normal Form
patientNO, drugNo, startDate, fullName, wardNo, wardName, bedNo, name, description,
dosage, methodOfAdmin, UnitsPerDay, finishDate
- Second Normal Form
patientNo, drugNo, startDate, wardNo, wardName, bedNo, unitsPerDay, finishDate
drugNo, name, description, dosage, methodOfAdmin
patientNo, fullName
- Third Normal Form
patientNo, drugNo, startDate, wardNo, wardName, bedNo, unitsPerDay, finishDate
drugNo, name description, dosage, methodOfAdmin
patientNo, fullName
wardNo, wardName
c) Identify the primary, alternate, and foreign keys in your 3NF relations.
patientNo (FK), drugNo (FK), startDate, wardNo(FK), wardName, bedNo, unitsPerDay, finishDate
drugNo, name description, dosage, methodOfAdmin
patientNo, fullName
wardNo, wardName (AK)
(Primary key is the underlined which are patientNo, drugNo, startDate, wardNo)

14.5

The table shown in Figure 14.19 lists sample dentist/patient appointment data. A patient is given and
appointment at a specific time and date with a dentist located at a particular surgery. On each day of
patient appointments, a dentist is allocated to a specific surgery for that day.

a) The table shown in Figure 14.19 is susceptible to update anomalies. Provide examples of
insertion, deletion, and update anomalies.
- Insertion anomalies = the details about dentists (staffNo / dentistName) and patients
(patientNo / patientNames) are repeated in the relation, so each insertion must guarantee
that these details are consistent.
- Insertion anomalies with null values = if want to insert a doctor into the practice, then have
to insert null values for patient information
- Update anomalies = if want to modify the name of dentist or a patient, must ensure to find
and modify all occurrences of those names in the relation.
- Deletion anomalies = if delete all the patient’s appointment, then lose all the information
about the patient. If delete all of the doctor’s appointment, the loss of all information about
the doctor.
b) Identify the functional dependencies represented by the attributes shown in the table of
Figure 14.19. State any assumptions you make about the data and the attributes shown in this
table.
Attributes: staffNo, appointmentDate, appointmentTime, patNo
staffNo → dentistName
appointmentDate → appointmentTime
appointmentTime → appointmentDate
patNo →patName

c) Describe and illustrate the process of normalizing the table shown in Figure 14.19 to 3NF
relations. Identify the primary, alternate and foreign keys in your 3NF relations.
1NF
Appointment (staffNo, appointmentDate, appointmentTime, dentistName, patNo, patName,
surgeryNo)

2NF
Appointment (staffNo, appointmentDate, appointmentTime, patNo, patName)
SurgeryReg (staffNo, appointmentDate, surgeryNo
Dentist (staffNo, dentistName)

3NF
Appointment (staffNo, appointmentDate, appointmentTime, patNo)
SurgeryReg (staffNo, appointmentDate, surgeryNo)
Dentist (staffNo, dentistName)

Appointment – staffNo (PK), appointmentDate (PK), appointmentTime (PK), patNo (FK)


SurgeryReg – staffNo (PK), appointmentDate (PK), surgeryNo
Dentist – staffNo (PK)
Patient – patNo (PK)

Common questions

Powered by AI

Primary keys uniquely identify records within a table, such as ISBN for Book or borrowerNo for Borrower. Alternate keys provide alternative ways to access records, like a combination of Title and Edition for identifying books uniquely. Foreign keys reference primary keys in another table to establish relationships; for instance, borrowerNo as a foreign key in Book Loan table links to the Borrower table .

Begin by identifying entities like ParkingLot, Space, and Staff. Define relationships such as "Uses" between Staff and Space, and "Provides" for ParkingLot and Space. Specify attributes like capacity and number of floors for ParkingLot, and extend the model with unique identifiers for complete access control, integrating all relationships into a unified ER diagram .

The functional dependencies include mappings like patientNo → fullName and drugNo → name, description. Understanding these dependencies is crucial as they guide the design of tables, ensuring data is consistently stored without redundancy and anomalies—critical for maintaining data integrity and easy retrieval .

Foreign keys maintain referential integrity by linking tables through shared attributes, ensuring data consistency and enabling complex queries across tables. They can be identified in normalized structures as attributes that reference primary keys in other tables, like borrowerNo in Book Loan referencing Borrower .

Insertion anomalies lead to data inconsistency if dentist and patient details aren't consistently inserted. Update anomalies occur when a change in a dentist's name requires multiple updates across records. Deletion anomalies can lead to loss of essential information when a patient or dentist record is removed. These anomalies compromise data integrity by causing discrepancies and data loss .

The normalization process involves: 1NF—Remove repeated groups and ensure atomicity (patientNo, drugNo, etc.). 2NF—Ensure all non-key attributes are fully functional dependent on the primary key (segment into separate tables like PatientDetails and Medication). 3NF—Eliminate transitive dependencies by isolating attributes like wardNo and drugNo into discrete tables while maintaining referential integrity .

To determine the multiplicity of relationships, analyze how entities interact. For example, a Student can enroll in many Courses (1..* multiplicity), each Course can have many Students enrolled (1..*), and each Student is assigned to one Room (1..1 multiplicity), while each Room can accommodate multiple Students (1..* multiplicity).

Defining unique attributes like names, locations, and capacities for parking lots helps in effective database management by facilitating accurate tracking, resource allocation, and enforcement of organizational policies, leading to optimized space usage and operational efficiency .

Begin by identifying entities such as Student, Course, Faculty, Hostel, and Room. Define relationships like "Enrolls" between Student and Course, or "Assigns" between Student and Room. Determine cardinalities, then visually map entities and relationships to draft an ER diagram showing all interactions and relational attributes .

The main entity types identified for the university database system include Student, Course, Faculty, Hostel, and Room. Each entity represents key components of the university's operations concerning student information, academic records, and accommodation facilities.

You might also like