Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PL-SQL Expert

A medical practice in Brisbane needs to develop a patient appointment system so that the reception staff can easily check doctor schedule, allocate consultation times and manage medical tests for patients. You are required to develop a data model which will allow following information and activities to be recorded. 

The system needs to store doctor's name, address, qualification, contact number and date of joining the practice. A doctor is categorised as either a specialist or general practitioner. For a specialist the system also stores the area of speciality. Both categories of doctors provide consultation to patients. For a patient the system stores patient identifier, name, address, date of birth, gender and medical history. Medical history is stored as a single field of text in the current design. 

When a consultation is setup between a patient and a doctor, we record the consultation date, start time, duration and fees. A consultation may result in a referral to a specialist. A referral is stored in the system with the following details: referral date, reason for referral, the specialist being referred and the consultation that led to the referral. 

A consultation may also result in requests for one or more tests that are conducted by the practice. It is mandatory to have a consultation by a doctor before a test can be conducted. There are a number of tests such as blood tests and fitness tests that can be administered by the staff employed by the practice. For every test we store test identifier, cost, consultation identifier that requested the test, test date, test result date and a follow up flag in case the client requires further urgent consultation or further tests. 

Prepare the following: 

a) An ER diagram for the system. Show all entities, relationships, cardinalities and optionalities. Also, include all intersection entities. You must use the Finkelstein methodology as per the study book and tutorials. 

b) A list of relations (equivalent to Finkelstein entity list). Produce complete relations for all entities and attributes. Show all primary and foreign keys. Include all attributes that are specifically mentioned and all key attributes. You may need to create primary and foreign keys that are not specifically mentioned. You must use the Finkelstein methodology as per the study book and tutorials. 

c) An Oracle SQL table create statement for the relation that you think is most critical in this system. This relation must have a primary key and at least one foreign key. 
SECTION B (Normalisation) 
Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation. You must use the Finkelstein methodology as used in the study book and tutorials. 

STUDENT (student number, name, address, email, ((course code, course name, description, grade, ((lecturer name, lecturer contact number, date assigned)) )), number of courses enrolled, student contact phone) 

1. Each student is identified by a student number. 
2. A student undertakes multiple courses and each course comprises multiple lecturers. 
3. The attribute 'grade' is achieved by a student in a course. 
4. The attribute 'date assigned' represents the date when the lecturer is assigned to the course. 
SECTION C (SQL) 
In this question, you will use the CAR HIRE database. The CAR HIRE database including 
appropriate data will be made available on the USQ Oracle server. You may query any of these tables but may not make changes. 

If you are using Oracle on your own computer and are unable to access the USQ server, email the course leader for a script file that will create the database for you. 

The table descriptions appear below, including the column names and data types. 

Write SQL queries to solve the following specifications. Provide the queries and the output. 
1. Display full details of all customers where (a) customer name starts with 'S' or ends with 'CO' and (b) county has not been specified. Order the output by customer name in ascending order. 

2. Using a set operator, find out all customer numbers who have not made any bookings. 

3. Display the car registration, cost, model name, model description, car group name and rental charge per day for each car bought after 31 December 2011. 

4. Display the average cost of cars for each car group where the average cost is greater than $50,000. 

5. Display the total number of bookings made for the most expensive car. 

6. Display the car registration and model name for all cars that are more than eighteen months old. 

7. Display all the bookings made in the year 2012 and reserved by 'JANE B'. 

8. Display the total amount due for the bookings made on the month of February in the year 2013. Exclude the amount that has not been paid. 

PL-SQL, Programming

  • Category:- PL-SQL
  • Reference No.:- M9431719

Have any Question?


Related Questions in PL-SQL

Purpose of the assessment with ulo mapping the purpose of

Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop skills in managing data in databases and to gain understanding of data model development and implementation using a commercially a ...

Continuing the project you have worked on in weeks 1-4 in

Continuing the project you have worked on in Weeks 1-4, in this final week, complete the following tasks: Refine your database and SQL statements by incorporating your instructor's feedback. Verify that the database comp ...

Complete the following tasksin microsoft access create the

Complete the following tasks: In Microsoft Access, create the database and tables that you identified in W3 Assignment 2. In Microsoft Word, write the SQL statements to create the database and tables. Write SQL statement ...

Assignment - queries functions and triggersaimthe aims of

Assignment - Queries, Functions and Triggers Aim The aims of this assignment are to: formulate SQL queries; populate an RDBMS with a real dataset, and analyse the data; design test data for testing SQL queries; create SQ ...

For this assignment you will be provided a database backup

For this assignment, you will be provided a database backup for a database called FinanceDB. You will have to restore this backup to your own version of SQL Server. All of the questions in this assignment relate to the F ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As