StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Analysis of Entity Relationship Diagram - Assignment Example

Cite this document
Summary
This assignment "Analysis of Entity Relationship Diagram" presents the Clinic ID that is chosen to be a combination of the year of establishment of the clinic number which is incremented by one each time a new clinic is set up. The two records inserted for each clinic has ID 20120001 and 20120002…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER98.2% of users find it useful
Analysis of Entity Relationship Diagram
Read Text Preview

Extract of sample "Analysis of Entity Relationship Diagram"

CO2060 (Databases) Assignment 12 K Number I declare that the attached work is all my own, and that where I have quoted from, used or referred to the opinions, work or writings of others, these have been fully and clearly acknowledged.  2 I am aware of the consequences of late submission. Contents Task 1: Entity Relationship Diagram 3 Task 2: Data Dictionary 4 Task 3: CREATE TABLE statements and screenshots of the table structure 5 Task 4: Screenshots of table with populated data, sample INSERT INTO tables and discussion 12 Task 5: 19 Query 1: SQL query and Screenshot of the results 19 Query 2: SQL query and Screenshot of the results 20 Query 3: SQL query and Screenshot of the results 21 Task 1: Entity Relationship Diagram Business Rules/Assumptions: i. A clinic must employ one or more staffs and each staff must be employed by one and only one clinic. ii. A clinic can create one or more appointments but each appointment must correspond to one and only one clinic. iii. A patient can fix one or more appointments but each appointment must correspond to one and only one employee. iv. A patient must receive one or more invoices but each invoice must correspond to one and only one patient. v. A patient can get immunized by one or more vaccines. vi. A staff can administer vaccines to one or more patients, but each patient must be administered by a vaccine, by one and only one staff. vii. An invoice must correspond to one and only one patient; however a patient can have more than one invoice. viii. All history records for each employee can be obtained by querying Invoice table. Task 2: Data Dictionary Entity/attributes DataType/size PK/FK Not Null/default values Clinic clinicID Number(8) PK Not Null clinicStreetName Varchar2(40) Not Null clinicCityName Varchar2(40) Not Null clinicCounty Varchar2(40) clinicPostCode Varchar2(7) Not Null clinicPhone Varchar2(11) Not Null clinicFax Varchar2(11) Not Null clinicManager Number(8) Staff staffID Number(8) PK Not Null staffFirstName Varchar2(20) Not Null staffLastName Varchar2(20) Not Null staffStreetName Varchar2(20) Not Null staffCityName Varchar2(12) Not Null staffCounty Varchar2(12) staffPostCode Varchar2(7) Not Null staffPhone Varchar2(11) Not Null staffDOB Date Not Null staffGender Char(1) Not Null staffJD Varchar2(20) Not Null staffClinic Number(8) FK Not Null staffNIN Varchar2(9) staffSalary Float Patient patientID Number(8) PK Not Null patientFirstName Varchar2(20) Not Null patientLastName Varchar2(20) Not Null patientStreetName Varchar2(20) Not Null patientCityName Varchar2(12) Not Null patientCounty Varchar2(12) patientPostCode Varchar2(7) Not Null patientPhone Varchar2(11) Not Null patientDOB Date Not Null patientGender Char(1) Not Null Vaccine vaccineID Number(8) PK Not Null vaccineDetail Varchar2(50) Not Null vaccineCost Float Not Null Invoice invoiceID Number(8) PK Not Null vaccineID Number(8) PK/FK Not Null invoiceDate Date Not Null invoiceCost Float Not Null invoiceStatus Char(1) Not Null patientID Number(8) FK Not Null staffID Number(8) FK Not Null Appointment appointmentID Number(8) PK Not Null clinicID Number(8) FK Not Null patientID Number(8) FK Not Null appointmentDate Date Not Null appointmentTime Varchar(8) Not Null Task 3: CREATE TABLE statements and screenshots of the table structure Table 1: Clinic - SQL Statement: Table Structure: Table 2: Staff -SQL Statement: Table Structure: Table 3: Patient SQL Statement: Table Structure: Table 4: Vaccine SQL Statement: Table Structure: Table 5: Invoice SQL Statement: Table Structure: Table 6: Appointment SQL Statement: Table Structure: Task 4: Screenshots of table with populated data, sample INSERT INTO tables and discussion Table 1: Clinic Clinic table is populated with 2 clinics (rows). Clinic ID is chosen to be a combination of year of establishment of the clinic and a clinic number which is incremented by one each time a new clinic is set up. Thus, the two records inserted for each clinic has ID 20120001 and 20120002. One clinic is assumed to be located at Southampton and the other at London. Clinic Manager Field is not populated currently as manager can be only be added if a corresponding entry is made in the staff table. Hence the field will be updated after the manager is added as an employee in the staff table. The insert statements used for the creation of two rows are shown below along with the screen shot of populated table. Table 2: Staff Four staffs were added, two for each clinic. One staff is assumed to a nurse and the other as manager. ID for each staff is populated as a combination of year of joining, the clinic number and staff number. The city for each staff is populated with the same value as the city in which the clinic (they are employed) is located. Two managers were then updated in the clinic table. The SQL statements and the screen shot of populated table are shown below. Table 3: Patient Records for four patients were created, two for each clinic. Patient ID is chosen as a combination of clinic number of the clinic at which the registration is performed and a patient number incremented by one upon each entry. SQL statements and screenshot of populated table is shown below: Table 4: Vaccine Two rows are created for two vaccines: One for typhoid and another for yellow fever. VaccineID for each vaccine are chosen as an integer which increments by one upon every entry. Invoice cost is populated by querying the vaccine table for vaccine cost based on the vaccine id for which the invoice is created. The SQL statements and screen shot of populated table are shown below: Table 5: Invoice Four invoices were recorded for two registered patients one for each clinic. Invoice ID are chosen as numbers incremented by one upon each entry. SQL statements and screen shot of populated table are shown below: Table 6: Appointment Four rows were inserted, two for each clinic. Appointment ID is chosen as a combination of date on which the appointment is fixed and an appointment number incremented by one upon each entry for the day. The SQL statements and the populated table are shown below: Task 5: Query 1: SQL query and Screenshot of the results Report listing the Clinic address, and telephone number of clinics that were established in the year 2012 along with the Manager’s name and contact number, ordered by clinic number. SQL Query: Output: Query 2: SQL query and Screenshot of the results List of details of unpaid invoices for the month of April 2012 for each patient, ordered by patient ID. SQL Query: Output: Query 3: SQL query and Screenshot of the results The names and staff numbers for all nurses over 35 years old, ordered by staff last name. SQL Query: Output: Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Databases Coursework Example | Topics and Well Written Essays - 2250 words”, n.d.)
Databases Coursework Example | Topics and Well Written Essays - 2250 words. Retrieved from https://studentshare.org/information-technology/1594154-databases
(Databases Coursework Example | Topics and Well Written Essays - 2250 Words)
Databases Coursework Example | Topics and Well Written Essays - 2250 Words. https://studentshare.org/information-technology/1594154-databases.
“Databases Coursework Example | Topics and Well Written Essays - 2250 Words”, n.d. https://studentshare.org/information-technology/1594154-databases.
  • Cited: 0 times

CHECK THESE SAMPLES OF Analysis of Entity Relationship Diagram

Software Engineering

The objects and their relationships are expressed graphically on an object diagram.... A State Transition diagram depicts the permitted states of an object and the events that cause a change of state....  During requirements analysis, the general course of model design is that the problem statement is studied to identify objects or classes of objects and the relationship between objects.... nbsp;In the present day, object-oriented software engineering methods use powerful modeling techniques to assist with the analysis and design of software systems....
13 Pages (3250 words) Essay

System Analysis and Design

In all this modeling techniques we can use UML to produce the diagrams such as the data flow diagrams and entity relationship diagrams.... Another comparison comes in that SSADM adopts the Waterfall model of systems development, where each phase has to be completed and signed off before subsequent phases can begin while the use of UML the no phases of development are defined thus as long as the classes and objects are clearly identified any diagram can be drawn....
10 Pages (2500 words) Essay

Software Development Life Cycle Models

This is the first derivative of the classic Software Development Life Cycle model which goes through the processes of requirement capturing and analysis, System analysis and Design, Code Generation, testing and maintenance.... After the requirement analysis, which is very similar to the other models discussed earlier, the objects are identified and development is taken up for those objects that need to be done fresh....
9 Pages (2250 words) Essay

Yojimbo supplies

This analysis will be able to propose a suitable Information system that can suit the need of the Yojimbo Supplies Ltd.... The firm specialise in Japanese Judo and Karate uniforms and stores a fully stocked retail outlet offering an unbeatable range of uniforms, accessories and equipments....
16 Pages (4000 words) Essay

System Modeling and Design

For this purpose, he will use UML diagrams like that class diagram, data flow diagram, Context diagram.... In this section of the user modeling, I will present the main system's Context diagram that will demonstrate the working and behavior of the existing physical system....
3 Pages (750 words) Assignment

Business system analysis

lass diagram A class diagram graphically demonstrates classes and subclasses in a system(Shelly, Cashman and Vermaat).... A class diagram is a diagram that demonstrates the associations as well as source code dependability amongst classes in the UML or Unified Modeling Language (Ambler, 2009).... Below is an example of Class diagram:Figure 1Class diagram, Source : http://en.... In software engineering, the utilization of a use case diagram thrush UML is a kind of behavioral drawing described through as well as shaped as of a Use-case investigation....
2 Pages (500 words) Essay

Unified Modeling Language Analysis

It normally uses a diagram as its form of notation to represent different business entities.... In the Unified Modeling Language, each of the diagram element is very well defined semantically hence is used very efficiently to describe business semantics in detail.... The meaning and preciseness of each diagram element are guaranteed if its semantics has been well defined.... This report "Unified Modeling Language analysis" discusses Unified Modeling Language that plays a major role in analyzing and describing the business structures using various diagrams and objects....
14 Pages (3500 words) Report

Realtime Automatic Monitoring and Control System Analysis

The individual entities for the water supply system can then be listed as:Pump APump BOperator consoleHeader tankThe various components interlink with data flowing in the directions shown in the diagram below:In the diagram above, both pump A and B supply the Header tank at different instances of timePump A is the primary tank which starts the filling process, and in case the water level keeps dropping to the second cut in level, tank B is then started.... or the bottle washing, storage and filling subsystem, the established entities includeBottle plantHeader tankWashing plantFiller plantAMACValvesData Storage componentThe relationships established between the AMAC and the external entities can be drawn below as follows, and showing cardinality of 1 with modalities, which also make up the ERD:The entities relate in the following ER diagram as shownThe entity diagram above, illustrates the relationship that exists between the control panel and the washing and filling plant, and also the relationship between the control panel and the control valves....
7 Pages (1750 words) Assignment
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us