Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Dew Drop Inn was built during the age of “mom and pop” motels. It started ou

ID: 3854440 • Letter: T

Question

The Dew Drop Inn was built during the age of “mom and pop” motels. It started out as four rustic log cabins in the style popular during the sixties. During the ensuing years it was rebuilt, and now offers eight efficiency units with high speed internet, kitchenettes, 140 TV channels and a variety of rooms. Several years ago the owners moved from an entirely paper system to a system using Microsoft Excel. This was sufficient for such a small operation, but now that the Inn has an internet connection, they want to make more use of the data. For this reason you have been retained to create a proper database using Oracle 11g. The schema for DDI is ready to be built.

Start by running the attached script from system/Oracle11. This will create the schema DDI, build several tables, and insert the current rows from the spreadsheets. Once you have the new user installed (DDI), begin to explore the data.

SPOOL your output to c:cs422aproject1spool.txt

Show all the tables that belong to DDI

DESCRIBE each of the tables

Print all the records in the ROOMS table

Explanation / Answer

1.SPOOL your output to c:cs422aproject1spool.txt

What spool do..
The SPOOL command causes SQL*Plus to write the results to a file on the operating system.
Once spool is set, SQL*Plus will continue to spool the output until the command SPOOL OFF.
spool '/c:/cs422a/project1spool.txt'
CREATE VIEW DDI.LEDGER_VIEW
AS
SELECT REG.RegID, REG.RegDate, P.LastName, P.FirstName,
REG.AdultCnt, REG.ChildCnt, REG.RoomNum,
RM.RoomSize, RM.RoomBedCnt, RM.RoomRate
FROM DDI.ROOMS RM, DDI.PATRONS P, DDI.REGISTRATIONS REG
WHERE REG.PatronID = P.PatronID
AND REG.RoomNum = RM.RoomNum
ORDER BY REG.RegDate, REG.RoomNum;
spool off

2.Show all the tables that belong to DDI
Connect to the database:
To list all tables owned by the current user, type:
select tablespace_name, table_name from all_tables;

3.DESCRIBE each of the tables

describe ROOMS
describe PATRONS
describe REGISTRATIONS

4.Print all the records in the ROOMS table
* used for all column values.
select * from rooms

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote