Modify the database to reflect that two new properties

Assignment Help Basic Computer Science
Reference no: EM131947295

Using the SQL script below, how can I do the following?

a. Modify the database to reflect that two new properties (property # 7 and 8) were added by the renting company and two new renters (renter # 5 and 6) rented these new properties from Nov 1, 2010 [You can make up property and renter details]

b. Show property number, property rent, and renters' name for all the properties that were rented in any part of year 2010.

c. Show rental history (renter number, renter name, and rent start date, end date) of the properties that are currently in rent.

Drop table Property Cascade Constraints;
Drop table Renter Cascade Constraints;
Drop table Renting Cascade Constraints;

Create Table Property (
Pno        Number(4) Not Null,
Street           Char(14),
City       Char(10),
Zip        Char(8),
Rooms      Number(3),
Rent       Number(5,2),
Primary Key(Pno));

Create Table Renter (
Rno        Number(4) Not Null,
FName      Char(10),
LName      Char(10),
Address          Char(40),
Max_Rent   Number(5,2),
Primary key (Rno));

Create Table Renting (
Pno        Number(4) Not Null,
Rno        Number(4) Not Null,
Rent_Start Date,
Rent_End   Date,
Primary key (Pno, Rno, Rent_Start),
Foreign Key(Pno) references Property,
Foreign Key(Rno) references Renter);

Insert into Property values (1,'16 Holhead','Dee','Aberdeen',6,650);
Insert into Property values (2,'6 Argyll St','Kilburn','London',4,400);
Insert into Property values (3,'6 Lawrence St','Partick','Glasgow',3,350);
Insert into Property values (4,'2 Manor Rd',NULL,'Glasgow',3,375);
Insert into Property values (5,'18 Dale Rd','Hyndland','Glasgow',5,600);
Insert into Property values (6,'5 Novar Dr','Hyndland','Glasgow',4,450);

Insert into Renter values(1,'John','Kay','56 High St, Putney, 
London',425);
Insert into Renter values(2,'Aline','Stewart','64 Fern Dr, Pollock, 
Glasgow',450);
Insert into Renter values(3,'Mike','Ritchie','18 Tain St, Gourock',750);
Insert into Renter values(4,'Mary','Treager','5 Tarbot Rd, Kildary, 
Agerdeen',600);

Insert into Renting values(1,4,'01-JAN-2005','30-DEC-2006');
Insert into Renting values(2,1,'01-FEB-2005','30-JUL-2006');
Insert into Renting values(3,2,'15-JAN-2006','30-DEC-2007');
Insert into Renting values(4,2,'01-JAN-2004','30-DEC-2006');
Insert into Renting values(1,3,'06-JUN-2007',NULL);
Insert into Renting values(3,4,'01-JAN-2007','30-DEC-2007');
Insert into Renting values(4,1,'01-JAN-2008',NULL);
Insert into Renting values(5,2,'01-MAR-2007',NULL);
Insert into Renting values(6,4,'01-JUL-2008','15-OCT-2010');

Insert into Renting values(6,3,'01-NOV-2010',NULL);
COMMIT;

Reference no: EM131947295

Questions Cloud

Logic and pseudocode for a database : The aim of this project write the Logic and Pseudocode for a database consisting of two major sets of tables - personal related and medical related.
Find the average compound monthly interest rate : Bob puts 10,000 into a bank account that has monthly compounding with interest credited at the end of each month. The monthly interest rate is 1% for the first.
How important is organization fit for outback steakhouse : We explain to applicants that being an Outbacker means taking care of others, and we tell them how they will be held accountable for that.
Circuit switching to the packet switching : Compare the circuit switching to the packet switching. Identify the benefits and limitations of the circuit switching and packet switching methods
Modify the database to reflect that two new properties : Modify the database to reflect that two new properties (property # 7 and 8) were added by the renting company and two new renters
Calculate the before-tax and after-tax rates of return : Calculate the before-tax and after-tax rates of return if the company uses declining balance at 150% to depreciate their assets.
What will the price of the bond be : A bond has a $1,000 face value, 12 years to maturity, and 8 percent coupon rate with coupons paid annually. The bond is selling today for $980.
Calculate the npv including the initial costs : It will produce an inflow after operating costs of $170,000 in year 1, $270,000 in year 2, Calculate the NPV including the initial costs.
How field names should be defined in the database : Describe how field names should be defined in the database. Why is it not a good to assign field names such as field1, field2, field3, and so on?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd