Details of this Paper

Assignment 2

Description

solution


Question

;;Assignment 2 specification;The assignment must be submitted electronically via the online assignment submission link on the study desk. Instructions will be provided on the course study desk.;If you are unable to complete the whole assignment, submit what you have done rather than nothing.;You must use the official USQ data modelling and normalization methodology. This methodology is based on Clive Finkelstein ? s techniques (SR 2.1 and SR 2.2) and all the examples in the lectures, study book and the tutorials use this methodology.;If you do not use the USQ methodology, you will probably be awarded a mark of zero.;You might wish to use a word processor or a drawing tool. In either case, you must adapt the drawing to conform to the USQ methodology.;This assignment covers much of the same ground as the exam and will provide you with a strong indicator of your level of preparedness for the exam. Most of the questions are of examination standard.;SECTION A (Data Modelling) (40 marks);A local pharmacy store in Wollongong wants to develop an online system to track their product inventory as well as prescription records of their products for regulatory requirements. As part of systems development, a data model is required to determine data entities and associated attributes and business rules. You are required to develop a data model which will allow the information and activities to be recorded.;The most important data entity for the system is the ITEM entity - this entity represents all the products in the pharmacy. Item code, shelf, location and quantity are the attributes for ITEM entity. Every time an item is ordered, some of the order details such as order date, order quantity and special instructions to the patient for each item in every order are stored. Patient information includes an id, patient name, date of birth, contact number and next of kin details. Each patient may have multiple orders of several items. While most orders are from patients this is not always the case. An order can be created without necessarily being associated with a patient, e.g. order from a casual customer buying items.;An item can be of two types: medical or non-medical. Understandably more than 95% of items in the pharmacy are medical items. For non-medical items, promotion period is an additional attribute to store since the pharmacy only sells non-medical items during promotions. Medical items are further classified into three types: doctor-prescription items, over-the-counter prescription items, and no-prescription items. Prescription records are required to be stored in the system. One doctor can prescribe multiple doctor-prescription items and vice versa. We store the prescription date and special instructions by the doctor prescribing a particular item. It is also important to store the doctor's name, specialty and registration number from the Medical Board of Australia.;An over-the-counter prescription item must be given by one of the store's pharmacists after consultation with the customer. Several over-the-counter items can be prescribed by different store pharmacists, therefore we also need to store the prescription date and special instructions by the pharmacist prescribing a particular item. A pharmacist is one of two types of staff at the pharmacy store. The other type is general staff. For all staff, we store their name, date of birth. joined date and qualifications and level. For a pharmacist, we also need to store their registration number from the Pharmacy Board of Australia.;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. (25 marks);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. (10 marks);c) A SQL CREATE TABLE statement for the ITEM relation along with the creation of primary and foreign key constraints as required. (5 marks);MARKING CRITERIA FOR SECTION A;1. Entities ? no missing entities, appropriate names, no redundant entities, etc.;2. Cardinalities and optionalities all shown and correct.;3. Complete list of relations, showing all applicable attributes, primary keys and foreign keys.;4. Sophistication: well-presented solution, good layout, innovative approach, correct diagrams and notation, solution easy to read and understand, solution comprehensive;5. SQL CREATE TABLE uses an appropriate relation, is syntactically correct and meets the business rules.;6. USQ methodology used throughout.;SECTION B (Normalisation) (20 marks);Produce a set of relations (equivalent to the Finkelstein entity list) in third normal form (3NF) from the following un-normalised relation for a flight reservation system. You must use the Finkelstein methodology as used in the study book and tutorials.;FLIGHT (departure airport code, departure airport name, departure time, departure date, arrival airport code, arrival airport name, arrival time, arrival date, aircraft name, manufacture date, first class seats, business class seats, economy class seats, ((flight crew member, date joined, hours worked, crew member position, ((crew member role)))), ((booking number, booking type, booking date, ((passenger surname, passenger first name, passenger dob, passenger contact number, seat number, special requests)), ticket price, booking fee)));Notes;Name of an aircraft can uniquely identify any aircraft.;The number of seats in the economy, business and first class can be different for each aircraft.;Each flight has a service of several crew members. Each crew member has one position but can have multiple roles such as cabin service and supervisor that must be recorded.;The number of hours that each crew member worked in a particular flight regardless of their role is stored in the "hours worked" attribute.;A departure airport for one flight can be an arrival airport for another flight and vice versa. Hence, it is important to uniquely identify an airport.;A particular booking can be of two types: direct or through agent.;Ticket price can be different for every flight under different bookings.;Seat number and special requests by a passenger are associated with the corresponding flight and booking reference along with the passenger.;MARKING CRITERIA FOR SECTION B;1. Relations ? no missing relations, appropriate names, no redundant relations.;2. All primary keys present and correctly notated.;3. All foreign keys present and correctly notated.;4. All attributes present.;5. All repeating groups resolved.;6. Derived attributes indicated in brackets.;7. All 2NF and transitive dependencies resolved.;8. All relations correctly notated using USQ methodology.;SECTION C (SQL) (40 marks);For each question, four marks will be awarded for the query and one mark for the screen capture of the results obtained after executing the query. Please copy the screenshot and paste it in your assignment solution document for every question.;The following E-R diagram represents a Car Hire database.;I_CarGroup;I_Model;I_Car;I_Booking;I_Customer;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.;The table descriptions appear below, including the column names and data types.;I_CAR;Column Name;Type and Size;Constraints;Description;Registration;VARCHAR2(7);NOT NULL;Registration number of the car. This is the Primary key.;Model_name;VARCHAR2(8);FK;Model for the car. Foreign key into the Models table.;Car_group_name;VARCHAR2(2);FK;Group code defining type of car and rental cost. Foreign key into the CarGroups table.;Date_bought;DATE;Date the car was purchased.;Cost;NUMBER(8,2);The original cost of the car.;Miles_to_date;NUMBER(6);The current mileage of the car as read at the end of the most recent rental.;Miles_last_service;NUMBER(6);The mileage of the car when it was last serviced.;Status

 

Paper#63249 | Written in 18-Jul-2015

Price : $27
SiteLock