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...
We continue from the two tables in lab 3 part 2, and practice with functions and...
We continue from the two tables in lab 3 part 2, and practice with functions and the GROUP BY statement. The data in each table should be as below Table Product: PROD_ID PROD_NAME PROD_PRICE PROD_VENDOR 1101 Table 100 2 1102 Chair 80 3 1103 Armchair 90 2 1104 Nightstand 110 1 1105 Bed 200 3 1106 Dresser 150 3 1107 Daybed 190 2 1108 Ash Table 120 2 1109 Cherry Table 130 2 1110 Table - High 100 2 1111...
We continue from the two tables in lab 3 part 2, and practice with functions and...
We continue from the two tables in lab 3 part 2, and practice with functions and the GROUP BY statement. The data in each table should be as below Table Product: PROD_ID PROD_NAME PROD_PRICE PROD_VENDOR 1101 Table 100 2 1102 Chair 80 3 1103 Armchair 90 2 1104 Nightstand 110 1 1105 Bed 200 3 1106 Dresser 150 3 1107 Daybed 190 2 1108 Ash Table 120 2 1109 Cherry Table 130 2 1110 Table - High 100 2 1111...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT