Question

In: Computer Science

Given the business rule below. Draw the Data directories for each entities & ER Diagram. A...

  1. Given the business rule below. Draw the Data directories for each entities & ER Diagram.


A DOCTOR can be scheduled for many APPOINTMENTS, but may not have any scheduled at all. Doctor has the attributes such as DoctorID, Firstname, & Lastname. Appointment has attributes such as AppointmentID, Date & Reason. A PATIENT can schedule one or more appointments. Patient entity has attributes such as PatientID, PatientName & Address. One appointment is scheduled with exactly one patient. An appointment must generate exactly one BILL. Bill entity has attributes such as BillID, Amount & Status. One PAYMENT is applied to exactly one bill. Payment entity has attributes such as PaymentID & Amount. One patient can make many payments, but a single payment is made by only one patient.

  1. Identify all the entities, attributes & data types, & constraints in data dictionaries. [10 marks]
  2. By drawing an ER diagram, identify the cardinality relationship of the entities. [20 marks]


Solutions

Expert Solution

Entities, attributes & data types, & constraints in data dictionaries

DOCTOR
Attribute name Data type NULL Key
DoctorID VARCHAR(10) NOT NULL Primary key
FirstName VARCHAR(50) NOT NULL
LastName VARCHAR(50) NOT NULL
PATIENT
Attribute name Data type NULL Key
PatientID VARCHAR(10) NOT NULL Primary key
PatienttName VARCHAR(50) NOT NULL
PatientAddress VARCHAR(50) NOT NULL
APPOINTMENT
Attribute name Data type NULL Key
AppointmentID VARCHAR(10) NOT NULL Primary key
PatientID VARCHAR(10) NOT NULL Foreign key
DoctorID VARCHAR(10) NOT NULL Foreign key
Date DATE NOT NULL
Reason VARCHAR(100) NOT NULL
BILL
Attribute name Data type NULL Key
BillID INT NOT NULL Primary key
AppointmentID VARCHAR(10) NOT NULL Foreign key
Amount FLOAT NOT NULL
Status VARCHAR(10) NOT NULL
PAYMENT
Attribute name Data type NULL Key
PaymentID INT NOT NULL Primary key
BillID INT NOT NULL Foreign key
Amount FLOAT NOT NULL
PatientID VARCHAR(10) NOT NULL Foreign key

ER diagram

Relationship and cardinalities are shown in crow's foot notation

  • A DOCTOR can be scheduled for many APPOINTMENTS, but may not have any scheduled at all. And an APPOINTMENT is made for exactly one DOCTOR. It is a one mandatory to many optional relationship.
  • A PATIENT can schedule one or more APPOINTMENT . And one APPOINTMENT is scheduled with exactly one PATIENT. It is a one mandatory to many mandatory relationship.
  • An APPOINTMENT must generate exactly one BILL. And a BILL belongs to exactly one APPOINTMENT. It is a one to one relationship.
  • A BILL may have one or more PAYMENT. And one PAYMENT is applied to exactly one BILL. It is a one mandatory to many mandatory relationship.
  • One PATIENT can make many PAYMENT, but a single PAYMENT is made by only one PATIENT. It is a one mandatory to many mandatory relationship.

Related Solutions

A data set is given below. ​(a) Draw a scatter diagram. Comment on the type of...
A data set is given below. ​(a) Draw a scatter diagram. Comment on the type of relation that appears to exist between x and y. ​(b) Given that x̅ = 3.8333​, Sx = 2.4014 ​, ȳ equals = 3.7333 3.​, Sy = 1.8381​, and r = -0.9545 ​, determine the​ least-squares regression line. (c) Graph the​ least-squares regression line on the scatter diagram drawn in part x   y 0   5.9 2   5.7 4   4.3 5   2.8 6   1.7 6   2...
A data set is given below. ​(a) Draw a scatter diagram. Comment on the type of...
A data set is given below. ​(a) Draw a scatter diagram. Comment on the type of relation that appears to exist between x and y. ​(b) Given that x̅ = 3.6667, sx = 2.0656​, ŷ = 4.2000​, sy = 1.4805, and r = −0.9287​, determine the​ least-squares regression line. ​(c) Graph the​ least-squares regression line on the scatter diagram drawn in part​ (a). x   y 1   5.2 2   5.8 3   5.4 4   3.8 6   2.4 6   2.6 ​(a) Choose the...
I need to draw an ER diagram for a future database necessary to hold application data...
I need to draw an ER diagram for a future database necessary to hold application data for students wishing to apply for an internship at a tech company. The students will provide the following information on the application: first name, last name, email, phone number, address, city, state, postal code, major, currently enrolled in school?, expected date of graduation, web framework of choice, list of programming languages in which the student is proficient, SAT score, ACT score, GPA, 4 character...
Please read the business statement below and draw ER, NER. Business Statement: The project is about...
Please read the business statement below and draw ER, NER. Business Statement: The project is about developing an auction Web site. The details are as follows: BA is an online auction Web site. People can buy and sell items in this Web site. Buyers are people who like to buy items, and sellers are people who like to sell items. Each seller can sell items. Each item has a bidding start time, an end time, and an owner. Sellers are...
A data set is given a) (a) Draw a scatter diagram. Comment on the type of...
A data set is given a) (a) Draw a scatter diagram. Comment on the type of relation that appears to exist between x and y. ​(b) Given that x overbarxequals=3.83333.8333​, s Subscript xsxequals=2.40142.4014​, y overbaryequals=3.98333.9833​, s Subscript ysyequals=1.74521.7452​, and requals=negative 0.9457−0.9457​, determine the​ least-squares regression line. ​(c) Graph the​ least-squares regression line on the scatter diagram drawn in part​ (a). x 0 2 4 5 6 6 y 6.0 5.8 4.7 3.0 2.1 2.3
Draw the diagram (ER / MR / UML) for a database containing the following characteristics: •...
Draw the diagram (ER / MR / UML) for a database containing the following characteristics: • Presence sensor that stores presence information with its timestamp and its location. • Distance sensor that saves distance information with its timestamp and its location. • An actuator of a switch that energizes a bulb, where the record of its been with your timestamp and your location. • An actuator of a motor that opens a door, where the record of its been with...
Create a diagram and explain the right-hand rule for the motor principle. Draw a diagram of...
Create a diagram and explain the right-hand rule for the motor principle. Draw a diagram of a single loop DC motor and label all the parts. Write a few sentences explaining how the motor is able to spin. thank you
1. Please read the business statement below and draw ER, NER, and Table Schema diagrams for...
1. Please read the business statement below and draw ER, NER, and Table Schema diagrams for it. Business Statement: The project is about developing an auction Web site. The details are as follows: BA is an online auction Web site. People can buy and sell items in this Web site. Buyers are people who like to buy items, and sellers are people who like to sell items.  Each seller can sell items .  Each item has a bidding...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality...
Instructions: Draw an ER diagram for the following description. Identify the keys and give the cardinality of all relationships (e.g. 1:1, N:1, N: M). Make sure you note your assumptions. Assume you are creating a database for a library system with the following properties: The library contains one or several copies of the same book. Every copy of a book has a copy number and is located at a specific location on a shelf. A copy is identified by the...
Part 1: Please read the business statement below and draw ER, NER, and Table Schema diagrams...
Part 1: Please read the business statement below and draw ER, NER, and Table Schema diagrams for it. Business Statement: The project is about developing an auction Web site. The details are as follows: BA is an online auction Web site. People can buy and sell items in this Web site. Buyers are people who like to buy items, and sellers are people who like to sell items. Each seller can sell items. Each item has a bidding start time,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT