Use Oracle Sql to test your data definition language (ddl) and data manipulation language (dml) and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Use Oracle Sql to test your data definition language (ddl) and data manipulation language (dml) and Data Control Language (dcl). 1. Create user hospital and assign all necessary privileges. Use Akawe as password 2. Change password to ipmc_12345 3. Create Tables a. Ward characterized by Wid, Wname, Beds, DOA, DOD b. Patient characterized by Pid, Pname, DOB and Contact 4. Rename the column names in the tables OLD COLUMN Wid Wname Beds DOA DOD NEW COLUMN Ward_Id Ward_Name No_Of_Beds Date_Of_Admission Date_Of_Discharge OLD COLUMN Pid Pname DOB Contact NEW COLUMN Patient Id Patient_FullName Date Of Birth Telephone Number Create the following constraints a. Available ward names are Maternity,Accident and Children's only b. A ward at any time must not havemore than 10 beds c. A ward consists of many patients, but a patient can be admitted into only one ward. Create a relationship to this effect d. A patients full name and date of birth are required e. Create a sequence to generate a patient's ID. The ID which begins at 100 and has an incremental value of 2 should not exceed 200 f. Use a date function to a. Find a patient's age b. Find the number of days a patient spends in a ward after discharged (round days to the nearest whole number) c. Find the number of months a patient spends in a ward after discharge (round months to the nearest whole number) d. A patient will have to report for review every 3 months after discharged until fully fit g. Display the details of a ward and only patients on admission h. Display the details of all wards and all patients in the hospital i. Create a view that includes the ward ID, patient ID, ward name, patient full name, date of birth, date of admission and date of discharge Use Oracle Sql to test your data definition language (ddl) and data manipulation language (dml) and Data Control Language (dcl). 1. Create user hospital and assign all necessary privileges. Use Akawe as password 2. Change password to ipmc_12345 3. Create Tables a. Ward characterized by Wid, Wname, Beds, DOA, DOD b. Patient characterized by Pid, Pname, DOB and Contact 4. Rename the column names in the tables OLD COLUMN Wid Wname Beds DOA DOD NEW COLUMN Ward_Id Ward_Name No_Of_Beds Date_Of_Admission Date_Of_Discharge OLD COLUMN Pid Pname DOB Contact NEW COLUMN Patient Id Patient_FullName Date Of Birth Telephone Number Create the following constraints a. Available ward names are Maternity,Accident and Children's only b. A ward at any time must not havemore than 10 beds c. A ward consists of many patients, but a patient can be admitted into only one ward. Create a relationship to this effect d. A patients full name and date of birth are required e. Create a sequence to generate a patient's ID. The ID which begins at 100 and has an incremental value of 2 should not exceed 200 f. Use a date function to a. Find a patient's age b. Find the number of days a patient spends in a ward after discharged (round days to the nearest whole number) c. Find the number of months a patient spends in a ward after discharge (round months to the nearest whole number) d. A patient will have to report for review every 3 months after discharged until fully fit g. Display the details of a ward and only patients on admission h. Display the details of all wards and all patients in the hospital i. Create a view that includes the ward ID, patient ID, ward name, patient full name, date of birth, date of admission and date of discharge
Expert Answer:
Answer rating: 100% (QA)
Answer1 Syntax CREATE USER IDENTIFIED BY SQL create user hospital iden... View the full answer
Related Book For
Posted Date:
Students also viewed these databases questions
-
The rectangular member OAB, shown in the figure, is held horizontal by the round hooked bar AC. The modulus of elasticity of both parts is 10 Mpsi. Use superposition to find the deflection at B due...
-
There are eight (8) offices located adjacent to one another in a hallway. Each office is the same size with an equal distance of 9 feet from the center of one door to the center of the next door....
-
Create a SQL script containing your data definition language (DDL) statements to create your tables, views, triggers, and other required database objects for your project. Your script must also...
-
Let z(k) denote the k-year continuously compounded zero-coupon yield for the current term structure. You are given that z(1) = 0.035, z(2) = 0.041, z(3) = 0.045, z(4) = 0.049, z(5) = 0.051, z(6) =...
-
The chain puller is used to draw two ends of a chain together in order to attach the master link. The device is operated by turning the screw S, which pushes the bar AB downward, thereby drawing the...
-
Consider the critical functions that families fulfill. What ones do you think are the most important? Why? Are these universal (i.e., the same across cultures)? Why or why not? How has the concept of...
-
As a financial analyst, you want to convince a client of the merits of investing in firms that have just entered a stock exchange, as an initial public offering (IPO). Thus, you gather data on 116...
-
Prior to adjustment at the end of the year, the balance in Trucks is $275,900 and the balance in Accumulated Depreciation'Trucks is $91,350. Details of the subsidiary ledger are as follows: a....
-
Suppose the real risk - free rate is 3 . 5 0 % , the average future inflation rate is 2 . 5 0 % , a maturity premium of 0 . 2 0 % per year to maturity applies, i . e . , MRP = 0 . 2 0 % ( t ) , where...
-
The process of designing and implementing a website for commercial use can be described as follows. First, the customer and the web design team have an informational meeting for half a business day....
-
Chipotle had a reputational crisis that caused their customers to be wary of their food. The food does not appear any different than what it was before, after implementing food safety changes. If you...
-
Your introductory course in accounting is exposing you to basic principles and practices. However, some circumstances require research into more specific accounting rules. These rules come from a...
-
Elizabeth Egbert owns a galvanizing plant. Customers bring in their fabricated steel products (like light poles, towers, trailers, etc.), and Egbert dips them into a vat of molten zinc. The zinc...
-
B. J. Stewart Furniture Company had the following transactions relating to the purchase and sale of leather sofas. There was no beginning inventory. Purchased 100 units on account at \($1\),000 per...
-
Aurora Wedding Gowns was burglarized in May of 20X5. It is unclear how many dresses were stolen. Aurora and its insurance company are currently working to estimate the dollar value of the stolen...
-
Carson's Camera Store has a number of video recording cameras in stock. All units are priced to provide a normal profit margin of \($150\). Some of these units are quite old. Carson's has concluded...
-
The first stage of a construction, is: Select one: O a. Initiation of proposal O b. Survey of the site O c. Preparation of tender O d. Preparation of estimate Preliminary project report for a road...
-
Arlington Merchants reported the following on its income statement for the fiscal years ending December 31, 2016 and 2015. 2016 2015 Sales $4,857,500 $4,752,900 Cost of goods sold 3,258,950 3,207,000...
-
How can you remove a user account from Oracle 11g?
-
If youre logged in to Oracle 11g, how can you determine which privileges are currently available to your account?
-
Create and execute SQL statements to perform the following actions, using the JustLee Books database: 1. Create a new user account. The account name should be a combination of your first initial and...
-
According to the monetary approach to the balance of payments, what type of economic policies would help a country resolve a balance of trade deficit?
-
If two countries had identical term structures of interest rates, what is the expected future exchange rate change between the two currencies?
-
Assume that the cost of a particular basket of goods is equal to $108 in the United States and 14,000 in Japan. a. What should the U/$ exchange rate be according to absolute purchasing power parity?...
Study smarter with the SolutionInn App