讲解:FIT9132、Databases、SQL、SQLC/C++|Haskell

FIT9132 Introduction to Databases2019 Semester 1Assignment 1 - Database Design - Monash Hospital (MH)Monash hospital treats patients who are identified by a unique patient id. When a patient isadmitted to the hospital, the hospital records the patients first and last name, address, dateof birth and emergency contact number (if they are not already on the system). They alsorecord the date and time of admission. The system needs to maintain a record of alladmissions for a particular patient. When a patient is discharged, the date and time of theirdischarge for this admission is recorded.While in the hospital patients are located in a ward. The ward is identified by a ward code.Monash Hospital wishes to record the total number of beds in each ward and the numberof currently available (empty) beds. Beds located in a ward are assigned a bed numberwithin that ward - thus, for example, each ward has a bed number 1. The bedsidetelephone number and bed type are also recorded. Beds are classified (their bed type) aseither fixed or adjustable. Not all beds are supplied with a bedside telephone.During a patients admission, they may need to be moved from one bed to another,possibly in a different ward. If this occurs the date and time the patient is assigned to thenew bed/ward are recorded (a history of all such bed assignments during admission isrequired).While in the hospital each patient is assigned one doctor (identified by a doctor id) as theirsupervising doctor. A patients supervising doctor may be in charge of many admissions.The hospital records each doctors first and last names and phone number. A doctor mayhave one or more specialisations (eg. Orthopaedic, Renal, etc), but not all doctors whowork at the hospital have a specialisation.During their admission, patients are prescribed procedures as part of their care by doctors.Procedures consist of tests such as X-Rays, Blood Tests etc, they also include medicalprocedures which might be required such as Shoulder Replacement. A patient may haveprocedures prescribed by their supervising doctor or any other doctor working in thehospital.Page 1 of 11A procedure is identified by a procedure code. Each procedure has a name (such asWrist X-Ray) and includes a description of what the procedure involves, the time requiredfor the procedure and the current standard patient cost for this procedure. When aparticular procedure is prescribed during a patient’s admission, the date and time when theprocedure is carried out is also recorded. A particular procedure is completed before anyfurther procedures are run (two procedures cannot occur simultaneously). Someprocedures, such as blood tests are carried out by technicians, more complex proceduremay require a doctor to perform the procedure.If a procedure is carried out by a technician the hospital does not record the details of thetechnician who completed the procedure.If a doctor carries out the procedure, the doctor who completes the procedure is recorded(the doctor who completes the procedure may be different from the doctor who prescribesit). Even if a team of doctors is involved in the procedure, only one doctor (the doctor incharge) is recorded as completing the procedure.Monash Hospital only record the details of a procedure carried out on an admission afterthe procedure has been completed.Not all admissions require a procedure to be carried out.Procedures may require extra items such as syringes or swabs. Each item held in stockis assigned an item code. The item description, current stock and price are recorded. Foraccounting purposes, each item is assigned to a unique cost centre, such as Pharmacy,Radiography or Patient Aids. A cost centre is identified by a cost centre code and hasrecorded the cost centre title and managers name. The quantity of each item used in aparticular procedure is recorded.Patients are billed for the cost for the procedure itself and also any extra items which areused as part of a procedure. The billed charge is based on the procedure/item cost at thedate and time of the procedure.Monash Hospital also records details of its nursing staff and their allocation to work in thewards. A nurse cannot work in (be assigned to) different wards on any given day.A nurse is identified by a unique numeric nurse id. The hospital also records the nursesfirst and last name. The initial date a nurse is assigned to work in a ward is recorded.Nurses may be moved between wards as staffing requirements change. When a nursefinishes an allocation with a particular ward the date they finished is also recorded. Withinthese changes, a nurse may return to a ward they previously worked in, if they do so, anew allocation is recorded.Page 2 of 11REMEMBER you must keep up to date with the Moodle assignment 1 forum where furtherclarifications may be posted (this forum is to be treated as your client). Please be careful toensure you do not post anything which includes your reasoning, logic or any part of yourwork to this forum, doing so violates Monash plagiarism/collusion rules.You are free to make assumptions if needed however they must align with the details hereand in the assignment forums and must be clearly documented (see the requiredsubmission files).Page 3 of 11Sample DocumentsADMISSION PROCEDURE CHARGE SHEETPage 4 of 11NURSE WARD ASSIGNMENT FORMPage 5 of 11TASKSPlease ENSURE your name and ID are shown on every page of any document you submit. Ifa document is a multipage document, such as for the normalisation, please also make sure youinclude page numbers on every page.GIT STORAGEAll working files, as you work on this assignment task, must be stored in GIT and must show aclear history of development. Your work for this task MUST be saved in your local repo in yourAssignments/Ass1A and Assignments/Ass1B folders and regularly pushed to the FIT GitLab serverto build this history of development.Moodle Part A Submission: [ 5 marks]1. Using LucidChart, prepare an INITIAL conceptual model (Entity Relationship Diagram) forMonash Hospital (MH).○ For this initial conceptual model, include what you see as identifiers (keys) for eachentity only (other attributes are not required) and all relationships.○ Surrogate keys must not be added to this model. Connectivity and Participationfor all relationships must be shown on the diagram. Participation must show bothminimum and maximum values (using a single line for 1:1 is not acceptable for thisunit).This initial conceptual model must be submitted to Moodle as Assignment 1 Part Aby 8 PM Monday of week 6. If this submission is not made by this date you will not beable to submit Assignment 1 Part B.Your tutor will provide feedback and guidance based on your submitted initial model whichshould be integrated into your continuing work in Part B.Moodle Part B Submission: [100 marks]2. Perform normalisation to 3NF for the data depicted in the sample Procedure ChargeSheet and Nurse Assignment Details.During normalisation, you must:○ Not add surrogate keys to the normalisation.○ You must include all attributes (you must not remove any attribute as derivable)○ Clearly show UNF, 1NF, 2NF and 3NF.○ Clearly identify the Primary Key in all relations.○ Clearly identify the partial and transitive dependencies (if they exist) in all 1NFrelations. You may use a dependency diagram or alternative notation (see thenormalisation tutorial sample solution for a possible alternative representation).Your attribute names as used in your normalisation and those on your conceptual/logicalmodels must be consistent i.e. the same name used on each for the same property.Page 6 of 113. Using LucidChart, prepare a FULL conceptual model (Entity Relationship Diagram) forMonash Hospital (MH).○ For this FULL conceptual model, include what you see as identifiers (keys) for eachentity, all required attributes and all relationships. This full model will be based onyour feedback from your Part A submission, the normalisation above and furtherreading of the case study. It may be necessary to revise/update this model whiledeveloping your logical model in part 4 below.○ Surrogate keys must not be added to this model. Participation and connectivityfor all relationships must be shown on the diagram.4. Based on your final full version of your conceptual model, prepare a logical level designfor the Monash Hospital database.○ The logical model must be drawn using the Oracle Data Modeler. The informationengineering or Crow’s foot notation must be used in drawing the model.○ All entities depicted must be in 3NF○ All attributes must be commented in the database.○ Sequences must be used to generate numeric primary keys and check clausesmust be applied to attributes where appropriate.○ Be sure to include the legend as part of your model.○ Note that your GIT repository must clearly indicate your development history withmultiple commits/pushes as you work on your model. If your modeFIT9132作业代做、Databases留学生作业代写、SQL程序语言作业调试、SQL实验作业代做 帮做C/C++编程l is added toGIT without a clear development history IT WILL NOT BE MARKED5. Generate the schema for the database in Oracle Data Modeler and use the schema tocreate the database in your Oracle account. The only edit you are permitted to carry out tothe generated schema file is to add header comment/s containing your details (studentname/id), drop sequence commands and the commands to spool/echo your run of thescript.○ Capture the output of the schema statements using the spool command.○ Ensure your script includes drop table and sequence statements at the start of thescript.○ Name the schema file as mh_schema.sql.Page 7 of 11Submission RequirementsAssignment 1A:Due: Monday 8th April 2019 (Week 6) 8 PMThe following files are to be submitted and must exist in your FITGitLab server repo:● A single page pdf file containing your initial version of your conceptual model. Name thefile mh_initial_conceptual.pdf. This file must be created via File - Download As - PDFfrom LucidChart (do not use screen capture) and must be able to be accessed with adevelopment history via GIT. You can create this development history by downloading andcommitting/pushing to GIT as you work on your model.Assignment 1B:Due: Monday 29th April 2019 (Week 8) 8 PMThe following files are to be submitted and must exist in your FITGitLab server repo:● A single page pdf file containing your final version of your conceptual model. Name the filemh_conceptual.pdf. This file must be created via File - Download As - PDF fromLucidChart (do not use screen capture), again must be able to be accessed with adevelopment history via GIT. .● A pdf document showing your full normalisation of documents A, B and C showing allnormal forms (UNF, 1NF, 2NF and 3NF). Name the file mh_normalisation.pdf● A single page pdf file containing the final logical Model you created in Oracle Data Modeller.Name the file mh_logical.pdf. This pdf must be created via File - Data Modeler - PrintDiagram - To PDF File from within SQL Developer, do not use screen capture.● A zip file containing your Oracle data modeler project (in zipping these files be sure youinclude the .dmd file and the folder of the same name). Name the file mh_oraclemodel.zip.○ This model must be able to be opened by your marker and contain your full modelotherwise your task 4 will not be marked. For this reason, you should carefullycheck that your model is complete - you should take your submission archive, copy it toa new temporary folder, extract your submission parts, extract your model and ensure itopens correctly before submission.● A schema file (CREATE TABLE statements) generated by Oracle Data Modeller. Name thefile mh_schema.sql● The output from SQL Developer spool command showing the tables have been created.Name the file mh_schema_output.txt● A pdf document containing any assumptions you have made in developing the model orcomments your marker should be aware of. Name the file mh_assumptions.pdfNote that there are seven required files. These files must be zipped into a single zip file nameda1-.zip e.g., a1-xyz123.zip before the assignment due date/time. Submit thea1-xyz123.zip to Moodle before the due date.Late submission will incur penalties as outlined in the unit guide.Page 8 of 11Marking Rubric Part AOutstanding (Range D - HD) Adequate (Range P - C) Not Adequate (N)Identified therequired Entities(1)● All/most entitiesidentified.● All/most keys arecorrectly identified.● Majority of entitiesidentified.● Majority of keys arecorrectly identified.● None or few of entitiesidentified.● None or few of keys arecorrectly identifiedIdentified therequiredRelationships (1)● All/most requiredrelationships identified.● Majority of requiredrelationships identified.● None/few requiredrelationships identified..Identified correctConnectivity andParticipation (1)● All/Most of depictedrelationshipsConnectivity andParticipation correctlyidentified.● Majority of depictedrelationshipsConnectivity andParticipation correctlyidentified.● None/few of depictedrelationshipsConnectivity andParticipation correctlyidentified.Able to correctlyuse the requirednotationconvention and beconsistent in itsusage. (2)All notations in the model areconsistent and followFIT9132 ERD standards.Most notations in the modelare consistent and followFIT9132 ERD standards.Few notations in the modelare consistent or followFIT9132 ERD standards.Page 9 of 11Marking Rubric Part BOutstanding (Range D - HD) Adequate (Range P - C) Not Adequate (N)Identify the datarequirements tosupport anorganisationsoperations from thesupplied case studyand expressesthese via adatabaseconceptual model.(50)All MH operations aresupported.● Required number ofentities are present● All/most requiredattributes and keyshave been captured● Surrogate keys havenot been added● All/most requiredrelationships havebeen captured● All/most requiredcardinality andparticipationconstraints havebeen capturedSome MH operations arenot supported.● Majority ofrequired entitiesare present● Majority ofrequired attributesand keys havebeen captured● Surrogate keyshave not beenadded● Majority ofrequiredrelationships havebeen captured● Majority ofrequiredcardinality andparticipationconstraints havebeen capturedMany of the MHoperations are notsupported.● None or few of therequired entitiesare present● None or few of therequired attributesand keys havebeen captured● Surrogate keyshave been added● None or few of therequiredrelationships havebeen captured● None or few of therequiredcardinality andparticipationconstraints havebeen capturedUnderstand andfollow a databasedesignmethodology. (25)All/majority of the designprocesses have beencorrectly followed:● All/most Normalisationprocesses are correct● Dependency diagramshave been provided andmatch normalisation.● ER diagram mapped tological model with onlyminor errors/omissions.● SQL DeveloperRelational modelcorrectly generated fromthe logical model● Sequences have beencreated to providenumeric primary keyswhere requiredSome of the designprocesses have beencorrectly followed:● Majority ofNormalisationprocesses are correct● Dependencydiagrams have beenprovided and matchnormalisation in themajority of situations.● ER diagram mappedto logical model withonly a small numberof errors/omissions.● SQL DeveloperRelational modelcorrectly generatedfrom the logical model● Sequences have beencreated to providenumeric primary keyswhere required in themajority of situationsFew of the designprocesses have beencorrectly followed:● Significant errorsduring theNormalisationprocesses● Dependency diagramsnot provided or havemajor errors● ER diagram mappedto logical model witherrors/omissions.● SQL DeveloperRelational model notcorrectly generatedfrom the logical model● Sequences have notbeen created toprovide numericprimary keys whererequiredPage 10 of 11Marking Rubric continuedOutstanding (Range D - HD) Adequate (Range P - C) Not Adequate (N)Understand andapply the relationalmodel principlesinto practice. (15)All relational modelprinciples have beenfollowed:● All/most entities are inthird normal form.● All/most Primary andForeign keys arecorrectly identified.● All/most data integrityrequirements (Entity,Referential, Domain)have been correctlyidentified.Most relational modelprinciples have beenfollowed:● Majority of entities arein third normal form.● Majority of Primaryand Foreign keys arecorrectly identified.● Majority of dataintegrity requirements(Entity, Referential,Domain) have beencorrectly identified.Few of the relationalmodel principles havebeen followed:● None or few of theentities are in thirdnormal form.● None or few of thePrimary and Foreignkeys are correctlyidentified.● None or few of thedata integrityrequirements (Entity,Referential, Domain)have been correctlyidentified.Able to generateand modify aschema given alogical model inSQL Developer. (5)The DDL script wasexecuted without errors.The DDL script wasexecuted with errors.Able to correctlyuse the requirednotation conventionand be consistent inits usage. (5)All notations in the modelare consistent.Some notations in themodel are consistent.Few notations in themodel are consistent.Page 11 of 11转自:http://ass.3daixie.com/2019042853423556.html

你可能感兴趣的:(讲解:FIT9132、Databases、SQL、SQLC/C++|Haskell)