You are planning to manage an international statistics of Lebanese rental houses.
You’re managing the
following database. This database contains 4 tables:
Table1: ″House″ contains general information about each house.
Table2: ″Clients″, a table to list all the clients’ information details.
Table3: ″House Type″ contains general information about each house’s type.
Table4: ″Rental″ contains all the transactions that have been done by each client.
A- Create the appropriate Queries to obtain the following results: (45 PTS).
1- In Query1: List all clients sorted in ascending order of Client ID with client type = "I". (8pts)
2- In Query2: List all clients who have rented a house registered in the database with all the columns
shown below. (6pts)
1/5
3- In Query3: List all houses which are not rented by any client and that have an Area > 300; Sort
the result in descending order of Year Built. (8pts)
4- In Query4: Show for each house that was built between 2000 and 2012, how many times was
rented and the sum of total price paid (Sum of Duration * Fees per month) with all the columns
shown below (Sort the result in descending order of Total price). (7pts)
2/5
5- In Query5: Calculate for each client, the total price paid (Duration * Fees per month), the Tax
(10% of total price in case the area is greater than 300, else 5%), the total after tax and the
Classification as follows : (9pts)
Class C for transactions that have a total after Tax less than or equal to 50 000 $
Class B for transactions that have a total after Tax between 50 000 $ and 100 000 $
Class A for transactions that have a total after Tax greater than or equal to 100 000 $
6- In Query6: Calculate for each house’s type, the total number of transactions made and show all
the columns shown below (ask for the house category). (7pts)
3/5
B- Update the Database with the following modifications: (20 PTS).
1. Create the appropriate mask for the field Type in table Clients. (2pts)
2. The House_Type field in table House should be the same entry as in table House Type, use a
combo box to input data. (6pts)
3. Create in table Clients, the appropriate rule for the Birth date field, in order to accept only dates
between #01/01/1930# and #31/12/1995#. Create also an appropriate validation text. (4pts)
4. Create a new table Category with the following fields: (8pts)
1st field: Category_ID (AutoNumber)
2nd field: Category_name (Text)
Insert into this table the following records:
1 First Category
2 Second Category
3 Third Category
Create the relationship with the appropriate table with the “Enforce Referential Integrity” checked.
C- Create the appropriate forms and sub forms to obtain the following results: (35 PTS).
1- Create a form that looks like the one below: (10pts)
4/5
2- Create a form in order to show information about each house with all the correspondent transactions. The
form will look like this one: (25pts)
5/5