CSE4DBF Database Fundamentals Assignment Problem

Assignment Help Database Management System
Reference no: EM132390425 , Length: 6 Pages

CSE4DBF Database Fundamentals Assignment - 2019 Semester 2, La Trobe University, Australia

AIMS AND OBJECTIVES -

  • To perform queries on a relational database system using SQL;
  • To demonstrate an advanced knowledge of stored procedures, stored functions and triggers.

Implement the following tasks using ORACLE SQL*Plus.

Task 1 -

Download the file NATURALTHERAPY.sql from the LMS site and run it on ORACLE SQL*Plus. This file contains all the CREATE and INSERT statements you will need for this assignment.

NOTE: YOU DO NOT NEED TO INSERT MORE DATA INTO THE TABLES.

The list of tables available for this assignment is the following:

MetabolicCategory (categoryNo, name)

FamilyDoc (GPNo, name, contactNo )

MedicalPractitioner (PractionerNo, name, contactNo, speciality)

Naturopath (NaturopathNo, name, contactNo, officeStartTime, officeEndTime, emailAddress)

RelevantCondition(conditionId, name)

MedicalCondition(conditionId, name)

Habits(conditionId, name)

Patient(patientId, name, gender, DoB, address, state,postcode, homePhone, businessPhone, maritalStatus, occupation, duration,unit, race, registrationDate , GPNo, NaturopathNo)

MetabolicFunction (functionNo, name, categoryNo)

Visit (visitNo, visitDate, time, amountPaid, receiptNo, service, medication, chiefComplaints, patientId)

PatientMetabolic (functionNo, patientId, score)

PatientPractitioner (patientId, practionerNo)

PatientRelCon (patientId, conditionId, notes)

PatientHabit (patientId, conditionId, year, average, unit, notes)

PatientMedCon (patientId, conditionId, notes)

RelevantConDetail (patientid, conditionId, specify)

NOTE: PK is printed bold and underlined, FK is printed italic, PK that is also FK is printed bold, italic, and underlined.

Using the tables provided above, provide SQL statements for the following queries.

(a) Display the number of patients referred to by each medical practitioner in the database.

(b) Find out which occupation has the greatest number of patients with high blood pressure.

(c) Display the area postcodes that have at least two patients under the age of 84 years old suffering from asthma.

(d) Display the details of the patient (i.e. Name, Gender, Address, Postcode, DOB) who smokes and has the highest (most severe) total of metabolic functions.

(e) Display the details of patients (i.e. Name, Gender, Address, Postcode, DOB) who haven't visited the naturopath in the last 6 months and who are suffering from a severe heart problem (the total score > 9 for Heart in metabolic screening questionnaire).

(f) Display the details of patients (i.e. Name, Gender, Address, Postcode, DOB) who smoke, have diabetes and high blood pressure. List these patients in an increasing order of their age.

(g) For each patient who has at least an allergy, display the patient's name together with his/her metabolic functions that have the total score >3.

(h) Display the details of all patients in the database (i.e. Name, Gender, Address, Postcode, DOB) together with the referring family doctor of that patient (if any).

(i) Display the average number of patients registered into the database each month.

(j) Display the most popular naturopath that has been visited by the patients.

Task 2 -

Provide the implementation of the following stored procedures and function. For submission, please include both the PL/SQL code and an execute procedure/SQL statement to demonstrate the functionality.

(a) Write a stored procedure that receives a date as input and displays as the output the list of patients who visited the naturopath on that day.

(b) Write a stored procedure that accepts as input a particular medical problem (from the past medical history), and as the output displays the number of patients suffering from that problem, grouped by the 3 age groups (children 0 - 12 years, teenagers over 12 - 20 years, and adult >20 years).

(c) Write a stored function that uses a patient's id as input and calculates the total amount paid to date by that patient. You also need to show an SQL statement to display the total amount paid by all of the patients in the database.

Task 3 -

Provide the implementation of the following triggers. For submission, please include both the PL/SQL code and an insert statement to demonstrate the trigger functionality.

(a) A trigger that is activated if the combination of a patient's name, DOB and living address (including address, state, postcode) already exists in the database.

(b) A trigger that is activated whenever a new medication given to a patient matches any one of the patient's allergy list.

Attachment:- Database Fundamentals Assignment Files.rar

Reference no: EM132390425

Questions Cloud

Organization from an organizational behavior standpoint : What are some challenges technology brings to an organization from an organizational behavior standpoint?
Describe how you will educate your patient to better care : Do a discussion on "Anorexia" to research. Describe how you will educate your patient to better care for themselves. This will require that you do research.
Are non-profits organizations sustainable : Are non-profits organizations sustainable? Will they exist in the future or will they work themselves out of a job?
Should either unions or managements be concerned : Should either unions or managements be concerned with the apparently small effect of higher economic outcomes on overall union member satisfaction?
CSE4DBF Database Fundamentals Assignment Problem : CSE4DBF Database Fundamentals Assignment - Semester 2, Assessment Help and Solution - La Trobe University, Australia - Write a stored procedure
Differenciate resulting alterations of hormonal regulation : Describe the differences and similarities between resulting alterations of hormonal regulation. Explain how the AGE might impact the diagnosis and prescription.
CHCDIV002 Promote Aboriginal and Torres Strait Islander : CHCDIV002 Promote Aboriginal and/or Torres Strait Islander cultural safety Assignment Help and Solutions-Victoria University, Australia-Diploma of Nursing-
NSG3029 Foundations of Nursing Research Assignment Problem : NSG3029 Foundations of Nursing Research assignment help and solutions, South University, assessment help - Identify the nursing framework or theoretical.
What effect aldosterone has on the distal convoluted tubule : What is the effect aldosterone has on the distal convoluted tubule? Why would the actions of aldosterone be useful to Rivka in her situation?

Reviews

len2390425

10/21/2019 11:42:19 PM

No Of Pages/Words: 5-6. I need this assignment done. It's DBF entry level consists of queries, triggers and procedures. Data file is also attached which will be used to populate the database. Task 1 sample solution is given, I have other sample solution which will be provided if needed. SUBMISSION GUIDELINES: Task 1, Task 2 and Task 3 should be saved to a file named task1.txt, task2.txt and task3.txt using the SPOOL command. Note an example of using the SPOOL command is given in the lab book. In the SPOOL file, you need to provide the query/procedure/function/trigger execution and the sample output. For the trigger, you need to show a sample test that demonstrates the successful execution of the trigger. CHECKLIST: The relevant SQL queries for the ‘Natural Therapy Centre’ Database System; The required stored procedures, stored function, and triggers.

Write a Review

Database Management System Questions & Answers

  Create the database that contains each of the relations

Find all Governors General of Australia who were Barons at the time of their appointment. List them by Title and name and date that they were appointed to the position. Order the list by ascending date of appointment.

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Draw an erd showing all entities and their relationships

Draw an ERD showing all entities and their relationships, and create table designs that include all necessary fields.

  Create and passunittests for each repository method

Create and PassUnitTests for each repository method in Your Mongo Participant Repository, Create Participant

  Which of the four components seem to be present in series

Shipments of Household Appliances. Which of the four components (level, trend, seasonality, noise) seem to be present in this series?

  Asnbspyou approach thenbspend ofnbspthe class you have

asnbspyou approach thenbspend ofnbspthe class you have seen how a database can be set up and accessed.nbspnext you

  Create data warehouse sections including computers-dvds

Create a data warehouse for electronics store chain. The chain has 20 stores in 5 cities. Each store has different sections including computers, DVDs, TVs, audio, home appliances etc.

  Create documentation describing the principles

Create documentation describing the principles and importance of normalization in relation to this project and the process by which this project was normalized.

  Design a simple protocol document

Design a simple Protocol Document (no more than 5 pages) with a PI and Co-PI and a data management plan based on an existing clinical trial protocol

  Find the items delivered by all suppliers

Using Access(or your class SQL Server account) create the SQL queries to answer the following questions from your textbook exercises at the end of the Reference 2 chapter which is immediately before Chapter 11.#51 is not in your text. Find the ite..

  Calculates the annual cost of running an appliance

Write a program that calculates the annual cost of running an appliance. The program will ask the user for the cost per kilowatt-hour and the number of kilowatt-hours the appliance uses in a year:

  Examine a query written against the database

Examine a query written against the database. You will examine the entity/relationship diagram (ERD) and in writing explain what information the database is holding (not the specific data, but in words what the business application is and how that ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd