Question

In: Computer Science

For this lab we will be taking our various tables (PATIENT, BED, PERSONNEL, DEPARTMENT, TREATMENT, TEST...

For this lab we will be taking our various tables (PATIENT, BED, PERSONNEL, DEPARTMENT, TREATMENT, TEST and all ASSOCIATIVE ENTITIES), created from our normalization process and entering them into SQL Server Management Studio.

For each of your tables, you will use SQL and the CREATE TABLE command to create each table with it's various columns (attributes).

You will then use the INSERT INTO command to add 5 rows of data (you make up your own data) to populate each table.

After creating the tables and entering the data - use the SELECT * FROM tablename to list all of the data in each table.

Save all your queries and turn in all queries, each "screen shot" of running each query and each of your tables with all of the data.

Solutions

Expert Solution

1). ANSWER :

GIVENTHAT :

RAW CODE:

create table PATIENT(id int(4),name varchar(20),age int(3),gender varchar(2));
create table BED(id int(4));
create table PERSONNEL(id int(4),name varchar(20),age int(3),gender varchar(2));
create table DEPARTMENT(id int(4),name varchar(20));
create table TREATMENT(treatmenttime int(3),cost int(4));
create table TEST(Testid int(4),name varchar(20));


insert into PATIENT values(1,'Tony',35,'M'),(2,'Clay',18,'M'),(3,'Jenny',20,'F'),(4,'Sony',30,'F'),(5,'Peter',24,'M');
insert into BED values(1),(2),(3),(4),(5);
insert into PERSONNEL values(1,'Robert',30,'M'),(2,'Lawrence',32,'M'),(3,'Lucy',20,'F'),(4,'Kate',30,'F'),(5,'Leopold',24,'M');
insert into DEPARTMENT values(140,'Emergency'),(2,'Cardiology'),(3,'Neurology'),(4,'Oncology'),(5,'Gynaecology');
insert into TREATMENT values(2,10),(7,40),(10,10),(10,50),(3,30);
insert into TEST values(1,'Bloodcount'),(2,'Bloodtype'),(3,'Kidneytest'),(4,'ESR'),(5,'Sugartest');


select *from PATIENT;
select *from BED;
select *from PERSONNEL;
select *from DEPARTMENT;
select *from TREATMENT;
select *from TEST;


Related Solutions

Lab 1 – Databases, Schemas, and Basic Tables For this lab we will be creating a...
Lab 1 – Databases, Schemas, and Basic Tables For this lab we will be creating a small Student Loan Database. Make sure to open your screenshot word document. Include the required screenshots of your code in the document. Database: Create a new database: StudentLoan_LastName. Schemas: Create the following schemas. Make sure to screenshot and run your code: 1. Student 2. Guarantor 3. Institution 4. Activity 5. Loan 6. Lender Tables: First complete the word document for designing the tables like...
Case #2 An elderly patient is sitting in bed taking a nap. A tray of uneaten...
Case #2 An elderly patient is sitting in bed taking a nap. A tray of uneaten food is on the bedside table. The nurse comes into the room. Think of a few ideas of what the nurse could say to start a therapeutic conversation with this patient. Provide references to support your statements. Please use your textbook. Nurse: “…………” Patient: “Oh, don’t bother with me. I don’t have much time left in this world. And I don’t have much to...
We wish to test if SBP changed after treatment for subjects in the treatment arm. Test...
We wish to test if SBP changed after treatment for subjects in the treatment arm. Test H 0 : μ t = μ c versus H a : μ t 6 = μ c for patients in the treatment arm using R function t.test . 44. What is the mean change in SBP (pre - post) in the treatment group? – a) -4.230 – b) 2.212 – c) 0.543 – d) -0.654 45. What is the 95% confidence interval for...
In this lab we will test to see if there is evidence of a difference in...
In this lab we will test to see if there is evidence of a difference in the average age for at least 1 of 4 groups of marital status (i.e., single, married, divorced, widowed). Use ?= 0.05. ANOVA Age in Years   Sum of Squares df Mean Square F Sig. Between Groups 8993.608 3 2997.869 25.214 .000 Within Groups 11414.182 96 118.898 Total 20407.790 99 To include in your submission: ü Copy the ANOVA Table from the SPSS output to your...
Why do we need security personnel, and do they contribute to our welfare? Could we make...
Why do we need security personnel, and do they contribute to our welfare? Could we make everyone at least as well-off if we would all cooperate so that we could reallocate some protective labor to more productive activity? Could this be an example of a prisoner’s dilemma? Diagram the game and explain where the US economy rests.
when the nurse is checking the lab results for a patient taking spironolactone, which results would...
when the nurse is checking the lab results for a patient taking spironolactone, which results would be potential concern?
Answer the question for each lab test of the following:- i. Name of Test: ii. Patient...
Answer the question for each lab test of the following:- i. Name of Test: ii. Patient Prep: iii. Preferred Specimen: iv. Transport Container: v. Temperature: vi. Clinical Significance: for example:- i. Name of Test: Electrolyte Panel ii. Patient Prep: patient does not need to be fasting iii. Preferred Specimen: blood iv. Transport Container: room temperature v. Temperature: room temperature vi. Clinical Significance: Clinical Significance of Abnormal Electrocardiographic Findings in Individuals Aging With Spinal Injury and Abnormal Lipid Profiles. Lab Test...
16. The patient has entered the hospital for a diagnostic test and treatment of a medical...
16. The patient has entered the hospital for a diagnostic test and treatment of a medical condition which of the following roles of the nurse is important at this time counseling the patient about the diagnosis Carrying out Rehabilitation activities with the patient Teaching the patient about the medical condition suggesting possible treatment option for the condition with the patient 24. A competent 90 year old patient was admitted to the emergency department with a major heart attack. The patient...
In our lab experiment, we filtered CaCl and CaOH2 solutions that we prepared the previous week...
In our lab experiment, we filtered CaCl and CaOH2 solutions that we prepared the previous week and transferred both of the filtrates using a 25 ml pipette into two erlenmeyer flasks. We then prepared the standard HCl by pipeting 100 ml of HCl to prepare 250 ml of 0.04M HCl from the 0.1 M HCl solution that we initially had. We pipeted 100 ml of HCl into a 250 ml volumetric flask and diluted to the mark. The buret was...
In my lab we found OUR average molarity to be 0.83334 M, but we used 3%...
In my lab we found OUR average molarity to be 0.83334 M, but we used 3% H2O2 (hydrogen peroxide), so I'm not sure how to do this or what numbers to even use. 7. Convert the average molarity of hydrogen peroxide into % (wt) of hydrogen peroxide (the density of the solution = 1.009g/ml). 8. Comparing the above calculated % of hydrogen peroxide with the known (labeled on the bottle) value, calculate the % experimental error.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT