From the database scheme write the query(all tables are empty) 1) Insert your name and your phone as a new tenant 2) Delete your phone number from the table tenant. 3) Create a new contract lease for you. 4) Delete the contract that you created. 5) List the city name, city population and country name.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
100%

From the database scheme write the query(all tables are empty)

1) Insert your name and your phone as a new tenant

2) Delete your phone number from the table tenant.

3) Create a new contract lease for you.

4) Delete the contract that you created.

5) List the city name, city population and country name.

6) List the cities that have the letters “re” in any part of the name;

7) List the tenant name contract number, rent price, when the contract rent price is bigger equal 500 and lower equal 1000.

8) List all columns from apartments with the services offered (all columns from service).

9) List the building address, the city name and the country name for the building in Canada.

10) List the name of the user with the city name and country name, ordering by name of user.

 

 
user
Tenant
userid INT
country
tenantid INT
? countryid INT(11)
username VARCHAR(50)
tenantName VARCHAR(45)
countryName VARCHAR(90)
password VARCHAR(255)
O tenantPhone VARCHAR (20)
name VARCHAR(45)
countryAbbreviation VARCHAR(3)
Indexes
Indexes
O email VARCHAR(45)
O birthday DATETIME
useratyid INT
City
OuserPrivilegeld INT(11)
cityld INT
Indexes
cityName VARCHAR(30)
cityPopulation DOUBLE
Contract
|Building
O city CountryId INT(11)
contractid INT
buildingid INT
Indexes
contractStartDate DATETIME
O buildingAddress VARCHAR(45)
O contractEndDate DATETIME
O buildingZipCode VARCHAR(7)
contractRentPrice DOUBLE
O buildingCityld INT
contracTenantid INT
Indexes
contracApartmentNumber INT
contracApartmentBuildingId INT
Indexes
Apartment
apartm entNumber INT
* apartm entBuilding Id INT
Service
O apartm entNumberRoom s DOUBLE
| ApartmentService
%23
serviceld INT
O apartm entRentPrice DOUBLE
apartm entServiceApartmentNum ber INT
serviceName VARCHAR(45)
Indexes
P apartm entServiceBuildingId INT
I apartmentServiceServiceld INT
Indexes
Indexes
Transcribed Image Text:user Tenant userid INT country tenantid INT ? countryid INT(11) username VARCHAR(50) tenantName VARCHAR(45) countryName VARCHAR(90) password VARCHAR(255) O tenantPhone VARCHAR (20) name VARCHAR(45) countryAbbreviation VARCHAR(3) Indexes Indexes O email VARCHAR(45) O birthday DATETIME useratyid INT City OuserPrivilegeld INT(11) cityld INT Indexes cityName VARCHAR(30) cityPopulation DOUBLE Contract |Building O city CountryId INT(11) contractid INT buildingid INT Indexes contractStartDate DATETIME O buildingAddress VARCHAR(45) O contractEndDate DATETIME O buildingZipCode VARCHAR(7) contractRentPrice DOUBLE O buildingCityld INT contracTenantid INT Indexes contracApartmentNumber INT contracApartmentBuildingId INT Indexes Apartment apartm entNumber INT * apartm entBuilding Id INT Service O apartm entNumberRoom s DOUBLE | ApartmentService %23 serviceld INT O apartm entRentPrice DOUBLE apartm entServiceApartmentNum ber INT serviceName VARCHAR(45) Indexes P apartm entServiceBuildingId INT I apartmentServiceServiceld INT Indexes Indexes
Expert Solution
steps

Step by step

Solved in 7 steps with 7 images

Blurred answer
Knowledge Booster
Basic sql queries
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT