Write stored procedures, SQL function statements
Each of the team is very likely to has the following tables in the existing model. Use the Excel data provided with this phase link:
PATIENT (some teams called it EMPLOYEE or CUSTOMER)
-if needed, alter your PATIENT table to include the ' fields ' in the imported PATIENT Excel file. Do not remove extra.
-patient table PK is in a 4-digit number
-the PATIENT table is likely to has relationships with other tables. If PATIENT have a 1-to-m relationship with table XYZ, you'll need to ensure the patientid exists as foreign key in table Xyz. Drop or add any constraints as needed
Employer
-if needed, alter your employer table to include the ' fields ' in the imported employer Excel file provided. Do not remove any extra.
-there is one employer record for now; All patients/employees work for that employer until further notice
-if The Employer table is joined with other tables, then keep in mind the pk/fk nature of the relationships
-your model is most likely to has a relationship between employer and EMPLOYEE (1-TO-M).
DOCTOR
-if needed, alter your DOCTOR table to include the ' fields ' in the imported DOCTOR Excel file provided. Do not remove any extra.
-randomly distribute patients among the doctors available in DOCTOR Excel file. You have a patients and doctors, which leads to approximately 4 patients per doctor
-establish a relationship between PATIENT and DOCTOR (1 DOCTOR, may patients) if not available
-licenseno is the DOCTOR table PK, data type number
Pharmacy
-if needed, alter your pharmacy table to include the ' fields ' in the pharmacy Excel file provided. Do not remove any extra.
-you has pharmacies with unique pharmacy number
-decide on how pharamacy would relate to other tables. Example, if pharmacy have a relationship with PATIENT, you might want to manually relate PATIENTS based on the location of Pharmacies in or nearest the city where they live
-before importing pharmacy data into SQL, with Excel function to separate the city, state, Zip column into three separate C Olumns:city, state and Zip. Yes, there is ways to doing this in Excel, Google it!
-pharmacy number 99999 is the Mail-in/fax/web prescription location
HOSPITAL
-if needed, alter your HOSPITAL table to include the ' fields ' in the HOSPITAL Excel file provided. Do not remove extra the HOSPITAL table
-ensure the relationship (s) between HOSPITAL and other tables. Assume that doctors work in hospital locations
-before importing HOSPITAL data into SQL, with Excel function to separate the city, state, Zip column into three separate C Olumns:city, state and Zip
HEALTHCARE PLAN (or INSURANCE company)
-if needed, alter your health plan/insurance table to include the ' fields ' in the HealthPlan Excel file provided. Do not remove extra fields are in the Healthcare Plan table
-randomly distribute patients among health plans as you do when the assigned patients to doctors. No need to assign plans to doctors nor to establish a relationship between PLAN and DOCTOR (unless you feel necessary)
Prescription
-this is an important table, contains prescription activities for several patients over a perio D of Time
-this table has data, refer to patients, and pharmacies where the drugs were picked up
Drug
-this ta BLE has both columns one for drug No and another for drug name
Additional Tables to be populated
Choose a minimum of 3 tables and populate with your own data. Those tables can be Basic, subtype or associative tables. The choice of the 3 tables should be strategic! For example, if any table given in the above sections have relationships with any of the 3 additional tables, then this tabl E would is a good choice to use. Choose tables that facilitate joins or relationships. A minimum of 5 records per each additional table is required; The more records, the better. Indicate in BB if exceed the minimum record count for 3 additional tables
For the 3 additional tables, create Excel files, populate with your own data and use Import Wizard. Save the INSERT statements used and include them populate_teamoracleid.sql.
For the 3 additional tables INSERT scripts use comments as follows:
/* Additional Table 1:table Name */
/* SQL statements used to populate the table */
Things to consider in this Phase:
1.Do Not remove tables this were created in Phase 3 in team's account. If you don't, use BB comments to inform the instructor
2.Even though the 3 additional tables require a minimum of 5 records, populate those tables with your own data sufficientl Y enough to ensure that potential queries would generate substantial results. The more records your add, the more realistic the outcome is. This is really important for 1-to-m relationships
3.Given the sample data provided, you may have a to adjust data type and field size
4.Maintain consistency in formats such as dates throughout the database
What to submit and Grading Criteria:
Upload Populate_teamoracleid.sql, this file was reserved for data import scripts
1.Answer all questions on BB; Review questions sooner than later. Each team member must prepare a list of specific tasks, the he/she performed in this Phase. Send Task List to team leader who'll compile and enter in BB questions
2.Grading won't be as flexible as previous phases. Ensure that meet the requirements fully, otherwise penalties would be assessed harshly!
3.Answers to any Phase questions would be shared with all groups via email, please check your messages
Suggested Order of Phase 4 completion:
1.Examine the Excel data files and compare to existing tables
2.Using SQL, modify existing tables to accommodate incoming Excel data. Don't remove tables, use ALTER or DROP column or constraint commands
3.Track your work in #2 in the designated file
4.Decide which 3 additional tables to populate and create Excel data file for each
5.Start the import process and track your work in the designated file
and run them as a script to delete the tables.
Http://www.6daixie.com/contents/15/1311.html
The core staff of the team mainly include Silicon Valley engineers, bat front-line engineers, domestic TOP5 master, PhD students, proficient in German English! Our main business scope is to do programming big homework, curriculum design and so on.
Our Direction field: Window Programming numerical algorithm AI Artificial Intelligence financial statistical Metrology analysis Big Data network programming Web programming Communication Programming game Programming Multimedia Linux plug-in programming API image processing embedded/Microcontroller database programming console process and thread Network security assembly language Hardware programming software Design Engineering Standard Rules. The generation of programming languages or tools including, but not limited to, the following ranges:
C/c++/c# Write
Java Write generation
It generation
Python writes
Tutoring Programming Jobs
The MATLAB Generation writes
Haskell writes
Processing Write
Linux Environment Setup
Rust Generation Write
Data Structure assginment Data structure generation
MIPS Generation Writing
Machine Learning Job Writing
Oracle/sql/postgresql/pig database Generation/Generation/Coaching
Web development, Web development, Web site jobs
Asp. NET Web site development
Finance insurace Statistics Statistics, regression, iteration
Prolog write
Computer Computational Method Generation
Because of professional, so trustworthy. If necessary, please add qq:99515681 or e-mail:[email protected]
: Codinghelp
Write stored procedures, SQL function statements