0% found this document useful (0 votes)
3 views3 pages

AccessExercise-Sample 3

Uploaded by

mytinhsz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

AccessExercise-Sample 3

Uploaded by

mytinhsz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Q1.

(35 marks)
a. Create 4 tables: Customer, Food and Drink, Movies, and Payment. Details of the given tables are
described as below:
 Customer
Customer ID Last name First name Mobile Address
1 Allen Eli (+45)7891023 15 Hackney Street
2 Barnes Sarah (+75)1235894 19 London Road
3 Cates Pearl (+44)2356890 28 Sackville Street
4 Sarah Yates (+55)7456341 12/34 Oxford
5 George Washington (+14)7294354 14/14/17 Portal
6 Theory Bank (+88)4589712 233 Portland Street
Table 3. Customer
Requirements of field names:
- Mobile: follows the style “(+11)111111”
- Others: Use appropriate arguments to choose the suitable data types

 Food and Drink


Food Order Food Types Quantity Price Date of Order
FD1 Meat 2 $30.00 1/8/2015
FD2 Extra 5 $15.00 12/9/2016
FD3 Meat 1 $12.00 9/11/2016
FD4 Vegetables 2 $40.00 7/8/2017
FD5 Vegetables 7 $35.00 3/4/2017
FD6 Extra 10 $50.00 4/4/2017
Table 4. Food and Drink
Requirements of field names:
- Food Types: create a (single selection) drop down list contains: Meat, Vegetables, and Extra
- Price: follows exactly the style given in the Table 4.
- Date of Order: follows the style “01/01/1111”
- Others: Use appropriate arguments to choose the suitable data types
 Movies
Movie Date of
Movie names Movie Types Country Quantity Price
Order release
Action,
M1 Destroyer 09-09-2017 China 2 $30.00
Detective
Action,
M12 The Mummy 10-10-2017 India 1 $10.50
Supernatural
M2 Avengers Action 06-06-2017 US 3 $5.00
The Horror,
M3 11-07-2017 US 7 $85.00
Magicians Supernatural
Sherlock Detective, TV
M4 02-03-2017 UK 4 $60.00
Holmes Series
M56 Sharpe Action, TV 04-04-2017 UK 12 $110.00
Series
M78 Dark Water Horror 05-05-2017 Other 1 $6.00
Table 5. Movies
Requirements of field names:
- Movie Types: create a multi-selection drop down list contains: Action, Detective,
Supernatural, Horror, and TV Series
- Date of Order: follows the style “01-01-1111”
- Price: follows exactly the style given in the Table 5.
- Others: Use appropriate arguments to choose the suitable data types
Custo
Payment Payment Card Card Expire Food Movie
Sort code mer
ID method types number date Order Order
ID
1 Card Visa 1234 5678 40-25-44 02-2019 1 FD1 M78
2 Card Maestro 1567 8944 55-55-55 08-2019 2 FD6 M56
3 Cash 0 3 M4
4 Cheque 0 4 FD3
5 Transfer 0 5 FD4
6 Card Visa/Debit 7744 5566 12-23-32 11-2020 5 M12
7 Card Master 4457 7888 96-96-96 04-2020 6 FD2 M2
8 Card Maestro 7452 1230 45-45-45 04-2021 6 FD5 M3
Table 6. Payment

 Payment
Requirements of field names:
- Payment method: create a (single selection) drop down list contains: Card, Cash, Cheque,
and Transfer
- Card types: create a (single selection) drop down list contains: Visa, Maestro, Visa/Debit, and
Master
- Card number: follows the style “1111 1111”
- Sort code: follows the style “11-11-11”
- Expire date: follows the style “month-year”
- Others: Use appropriate arguments to choose the suitable data types
b. Create relationships for the 4 tables. Known that, the three tables Customer, Food and Drink, and
Movies have “One-to-Many” relationship to table Payment. Show clearly these relationships.

Q2. (15 marks)


Use the tables in Q3 to create
a. Investigation query to show Last name and First name of any persons who has number 7 at the
middle position of Mobile and has the Payment method as “Cheque”.
b. Total price query to show
i. Last name, First name, Price of Food and Drink table, Quantity of Food and Drink table,
Movie names, Price of Movies table, Quantity of Movies table.
ii. Add additional column named Total which shows the following formula:
Total=Price ( Food∧Drink )∗Quantity ( Food∧Drink ) + Price ( Movies )∗Quantity ( Movies )
c. Movie price query to show
 Movie names and Date of release
 Additional column named as Late month Price which calculates the total price of each of
listed movie names (by multiplying with the Quantity). Known that this column only
calculates the price for any movies whose Date of release has value of the month less
than 7 and the Payment method as “Card”. Otherwise, “N/A” is displayed if the month of
release is greater or equal to 7. For examples, the results could be obtained as follows:
Movie names Date of release Payment method Late month Price
Dark Water 05-05-2017 Card 6
Sharpe 04-04-2017 Card 1320
Avengers 06-06-2017 Card 15
The Magicians 11-07-2017 Card N/A

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy