Identify and write the sql ddl to add foreign key

Assignment Help Database Management System
Reference no: EM133958709

Database Programming

Background
Australia Zoo Wildlife Hospital (AZWH) is a charity organization that exists to treat and or care for sick, injured or orphaned wildlife. They are brought animals from across South East Queensland, and beyond, and are re-knowned for their specialization in both Koalas and Sea Turtles.

As a charity that operates separately from the main Australia Zoo company, the Zoo runs with very little funds. As part of an ongoing agreement between University of the Sunshine Coast and Australia Zoo Wildlife Hospital (AZWH), we are re-developing their database systems.

Stage one is the Accession (admissions) system which stores information on who brought in the wildlife, where it was found, suspected injuries, initial triage and/or vet notes and what wildlife career if any the animal is assigned to for re-habilitation or care. Animals are brought for a large variety of reasons and sometimes multiple reasons, and the database is to record these and be able to query them.

The Wildlife hospital can see up to 6000-8000 admissions per year, and there is a large database of information (over 65000 entries) that is maintained both for their own record keeping and for regulatory requirements set down by the State and Federal Governments. One such regulatory requirement is that all Koalas treated in Queensland are given a unique QPWS (Queensland Parks and Wildlife Service) identifier that must be maintained. A monthly report is generated to give to QPWS on these koalas and their treatment. Other wildlife such as birds can be either transferred in or out of AZWL, and as such may have more than one ID that the database needs to be able to store, recall and query. Get AI-free online assignment help from experienced academic experts.

In appendices of this document you will find an example of a monthly report that currently takes up to 1 business day to prepare, a blank Australia Zoo Wildlife Hospital Accession form and a partially completed form. These will form the basis of your universe of discourse.
AZWH have a system in place, however it suffers from a very large number of issues and is far from efficient for them to use. The more time it takes them to enter their data, the less time and resources they can devote to saving wildlife.

Your task is to look at the supplied database schema and propose, justify and implement improvements to this system to make it more efficient.

You will need to identify and write the SQL DDL to add foreign key and uniqueness constraints, identify columns needing indexes and create those indexes, propose, with justification, re-design of tables to remove repeated data or for de-normalization for optimisation (implementation is not required), implement stored procedures for the identified common queries and implement part of the monthly report as python files that export to .csv format.

System Requirements
These requirements and sample reports are provided to assist in you in gaining an understanding of the existing system and the hospital's needs. You do not need to implement these requirements nor all the reports.

User Requirements
Every patient admitted has a unique patient id. If the patient is a koala, it will have also have a koala tag. It may have a microchip. Animals including, but not limited to, wallabies, kangaroos, and possums may have ear tags in one or both ears that uniquely identify them (The tags should have the same number but should be able to tell if one is missing). Turtles may also have a tag. Not all tag number formats will be the same

In addition to formal tags, some animals will have one or more alternate identifiers, being either a Queensland Parks and Wildlife identifier, or transfer from or to another facility such as Currumbin Wildlife Hospital, RSPCA, or Australia Zoo, these must all be maintained and searchable.

In addition to type, animals are sorted into ‘breeds', of which there are nearly 1000 in the current system. Each breed must be associated with exactly one ‘type'.

All animal wildlife may be admitted more than once, if they are re-admitted their previous patient number should be re-used, along with the date they were re- admitted - all historical admissions should be maintained (and not over written).

The database needs to record who brought in the animal, where it was found, including the regional or local council area it was found it - reports are generated for particular councils upon request. There should be a link between the postcode that the animal was found in and the local council it belongs to.

The system should be loss-less, no data should be over written.
Aetiology is the term used to describe the diagnosis categories for the wildlife. Animals can and will present with more than one aetiology. In addition, animals may be diagnosed with multiple diagnoses within a category - e.g. an animal may have multiple broken bones/anatomical issues.
During treatment, the vets will put notes on the forms, this information should be maintained where possible using searchable text fields
A wildlife patient can be assigned a treatment, this could be multiple medicines, or particular surgery or other actions. For medicine, the system should allow the start and stop date of each medicine/treatment. A treatment will be uniquely identified for patient, accession, and date it was prescribed.
AZWH maintains a contact list - they have other hospitals, other zoos/wildlife parks, government departments, other organizations, wildlife carers, vets, researchers, volunteers and general public that have brought in a patient. For all contacts, AZWH maintains, their first name, last name, title/salutation, email, phone number(s), street address, suburb, state, country, postcode, and what sort of contact they are.
User Reports
List the patient id, accession id, animal name, and breed for all animals, sorted by animal type, that are currently being treated (where they have not been released, or sent to a carer or other facility).
List all animals with a microchip, Qld Parks and Wildlife Id or ear tag within a given time period (ie. A month or year)
Monthly report (this is multiple queries):
list the total for all in-coming accessions in the previous calendar month grouped by
Diagnosis/Aetiology
Taxon group
Local government area
Cause of affliction
List the total number of accessions for this month in the previous years.
List the total number of accessions for each month in the previous 12 months.
List all Koalas in 2009 that were treated for Chlamydial Conjunctivitis

Specific Instructions
You are not to contact the hospital directly as this takes valuable resources away from treating the wildlife. All client communication is to be directed through your lecturer/tutor in the first instance and for more clarification through Course Coordinator Dr Erica Mealy.

All SQL Code for your assignment should be submitted under an open- source royalty free license, this allows you to use the database in your portfolio when you are seeking work as well as allowing for further development of the database for AZWH. The license we have selected is CC-BY 4.0. Please include the comment text in Appendix E at the start of your .sql & .py files. Please note that all data is copyright and owned by Australia Zoo Wildlife Hospital and is used with their permission for the purposes of this assignment. Further distribution of this data is not permitted.

Reference no: EM133958709

Questions Cloud

How did new right shift political discourse in united states : How did Ronald Reagan and the New Right shift political discourse in the United States?
Explain josef stalin from power struggles of 1924 to 1927 : Explain the emergence of Josef Stalin from the power struggles of 1924 to 1927, as the undisputed master of the Soviet Union and his consistent challenges.
Why was fort sumter of strategic importance to the north : Why was Fort Sumter of strategic importance to the North and the South?
What happened in the wall street bombing of 1920 : What happened in the Wall Street bombing of 1920. How can so many people die and yet it remains unsolved?
Identify and write the sql ddl to add foreign key : ICT320 Database Programming, University of the Sunshine Coast - identify and write the SQL DDL to add foreign key and uniqueness constraints, identify columns
Why did many americans criticize the mexican war : Why did many Americans criticize the Mexican War? How did they see expansion as a threat to American liberty?
Exploring intersections of manifest destiny-imperialism : Exploring the intersections of Manifest Destiny, imperialism, and American Exceptionalism, how has the Monroe Doctrine shaped United States foreign policy?
Develop a bi control panel using javafx along with wcf : Specify and develop RIAs across clients and servers and Employ OO design and programming when producing applications for typical APIs
Why would the south believe lincoln was out to end slavery : Based on Lincoln's quote, why would the South believe Lincoln was out to end slavery?

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

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

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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