Вы находитесь на странице: 1из 4

Situation 4

A service apartment management company located in a holiday resort provides a rental service for apartment owners who want to rent their units. The company rents the apartments by day to vacationers. You, as the information system specialist of the company, are asked to develop a computerized management system called Berjaya Information Management System (BIMS). In the system, you are required to: (a) Create a database that consists of two tables, namely table APARTMENT and table OWNER. The database should store Unit No., No. of Bedrooms, No. of Bathrooms, No. of Occupants, Daily Rate, If Occupied, Owner ID, Last Name, First Name, Address, City, State, Postal Code, and Telephone. (b) Enter at least eight records into the APARTMENT table. (c) Enter at least four records into the OWNER table. (d) Create a query (that links the two tables) to request a list of room information (Unit No., No. of Occupants, Daily Rate) which are occupied with their respective owners ID and name. (e) Create a form based on the query in (d). The form must show the title given and descriptive labels. (f) Create a report based on the query in (d). The report must show all the apartment information for each owner.

Main procedures in Using MS Access


Step 1: Create a new database (2 tables) Step 2: Set the relationship between the tables Step 3: Adding records to tables Step 4: Create query / queries 1. Create a query to request for apartments which have been rented out. 2. Create a query to list out apartments which are currently not rented out. Step 5: Create form / forms 1. Create forms for the two queries above. Step 5: Create report(s) 1. Create reports as stated in step 4.

Step 1: Create a new database (2 tables) Data structure for APARTMENT Table Field Name Unit_No No_Of_Bedroom No_Of_Bathroom Max_Occupants Daily_Rate If_Occupied Owner_ID Data Type Text Number Number Number Currency Boolean Text 6 Field Size 4 Primary Key? Yes Description Apartment Number Number of bedrooms Number of Bathroom Max number to stay in the unit Daily rental rate If the apartment being rented. (Y/N) Id of apartments owner

Data structure for OWNER Table Field Name Owner_ID Last_Name First_Name Address City State Postal_Code Telephone Data Type Text Text Text Text Text Text Text Text Field Size 6 15 15 20 15 15 5 12 Primary Key? Yes Description Id of apartments owner Last name of owner First name of owner Street address City State 5-digit code Tel(082-123456)

Step 2: Set the relationship between the tables Link the field Owner_ID for the two tables. This is called joining the tables. This is important when you want to do query or print report that involve retrieving data/information from two or more tables. Remember that the relation between the two tables is one owner MUST has at least one unit. And that all units MUST have an owner. OWNER Owner_ID Last_Name First_Name Address City State Postal_Code Telephone

APPARTMENT Unit_No No_Of_Bedroom No_Of_Bathroom Max_Occupants Daily_Rate If_Occupied Owner_ID

1. State all the primary key(s) from the tables. Answer : _______________________________________________

2. State the foreign key(s) and its table, if any, from the diagrams above. Answer : _______________________________________________

Step 3: Adding records to the two tables Records for Owner Table Owner
Owner_ID AM102 JH105 MJ207 MR106 Last_Name Morshidi Ho Jackson Rajasamy First_Name Ahmad Johnson Maria Muttu Address 803B Jln Dato Ali 47-E Jln Burong 9A Jln Kong Ping 578G Jln Muhibah City Kuching Kuching Sibu Miri State Sarawak Sarawak Sarawak Sarawak Postal_Code 91700 91704 92811 94571 Telephone 08248726 08243590 08444687 08523877

Records for Apartment Table Apartment


Unit_No No_Of_Bedroom No_of Bathroom Max_Occupants Daily_rate 301 302 304 403 404 501 503 703 2 2 1 3 1 2 3 3 2 2 1 2 1 2 2 2 4 4 2 6 2 4 6 6 $220.00 $220.00 $120.00 $300.00 $120.00 $220.00 $300.00 $300.00 If_Occupied No No No Yes No No Yes Yes Owner_ID MJ207 AM102 JH105 MR106 JH105 AM102 MR106 JH105

Вам также может понравиться