Sie sind auf Seite 1von 4

MANAGEMENT DEVELOPMENT INSTITUTE

MS ACCESS EXERCISE
1. Create the following tables in the CustomerData database:
Table Name Field Name Data Type Primary KeyX!
Customers Customer Number Text
X s
should start with
Capital C
followed b! " digits
Customer Name Text
#hone Text
$ddress1 Text
$ddress% Text
Cit! Text
#in Code Text
&rders &rder Number Text
X
'hould start with
Capital &
followed b! " digits
Customer Number Number( Text)
Date of &rder Date(Time
Date of Deli*er! Date(Time
+uantit! &rdered Number
$mount #aid ,es(No
-tem Code Text
#rodu.ts #rodu.t Code Text X
#rodu.t Name Text
#ri.e #er /nit Curren.!
'upplier Code Text
'uppliers 'upplier Code Text X
'upplier Name Text
#hone Text
$ddress1 Text
$ddress% Text
Cit! Text
#in Code Text
%. In addition to the above structure of database build the following relationships :
Le"t Table Ri#$t Table
Table Field Table Field
Customers Customer Number &rders Customer Number
&rders -tem Code #rodu.ts #rodu.t Code
#rodu.ts 'upplier Code 'uppliers 'upplier Code
3. Add the following data to the Customer Table
CUSTOMER
NUMBER
CUSTOMER
NAME
PHONE ADDRESS1 ADDRESS2 CITY PINCODE
C00001 M M VERMA 24925723 123/A CHANDANI
CHOWK
DELHI 110023
C00002 MAYURI 22345354 12/A DLF ENC GURGAON 122001
C00003 ANURAG
GUPTA
256295 !167 UTTARA
KHAND
NEW DELHI 110016
C00004 REHMAN 245794 23/45 GREEN
PARK
NEW DELHI 110016
C00005 RAMAN RAI 2693416 C 40 "ECTOR 40 NOIDA 122543
C00007 RAVI "INHA 2452376 C12 "ECTOR 36 NOIDA 122543
C00009 R R AGARWAL 24222321 K23 VA"ANT
KUN#
NEW DELHI 110070
C00010 "HANTI
!HATNAGAR
26172361 123/G UTTARA
KHAND
NEW DELHI 110016
C00012 K K MUN#AL 2421729 53 "KY
HEIGHT"
APT
GURGAON 122001
C00014 "AN#AY
PANDEY
26195692 123 "ECTOR 14 GURGAON 122001
4. Add the following data to the Orders Table
ORDER
NO
CUSTOMER
NUMBER
QUANTITY
ORDERED
DATE OF
ORDER
DATE OF
DELIVERY
AMOUNT
PAID
ITEM
CODE
O00004 C00010 2 04$A%&$13 10$A%&$13 N' CHR119
O00007 C00001 1 05$M(&$13 12$M(&$13 Y)* FRG217
O00009 C00007 3 1$F)+$13 25$F)+$13 Y)* FAN227
O00015 C00004 2 17$F)+$13 19$F)+$13 Y)* FAN12
O0001 C00005 3 2$F)+$13 03$M(&$13 Y)* TLT114
O00033 C00004 1 20$M(&$13 25$M(&$13 Y)* OVN13
O0003 C00007 4 10$A%&$13 20$A%&$13 N' TV29
O00042 C00001 1 05$M(&$13 15$M(&$13 N' W"M52
O00050 C00012 1 1$F)+$13 20$F)+$13 Y)* TV29
O00053 C00009 2 02$A%&$13 05$A%&$13 N' FAN227
O00072 C00002 2 19$F)+$13 03$M(&$13 Y)* FAN12
O00073 C00001 1 01$F)+$13 15$F)+$13 Y)* FRG217
O0009 C00003 1 07$M(&$13 12$M(&$13 N' CLK213
O00100 C00001 12 04$#,-$13 20$#,-$13 N' !L!220
O00112 C00001 1 23$F)+$13 26$F)+$13 Y)* TV23
O0014 C00014 1 20$M(&$13 22$M(&$13 N' WRD23
O00215 C00012 1 05$M(&$13 07$M(&$13 N' WRD23
O0027 C00010 1 15$F)+$13 17$F)+$13 N' W"M52
5. Add the following data to the roducts Table
PRODUCT CODE PRODUCT NAME PRICE PER UNIT SUPPLIER
CODE
!L!220 ECE !LU!" R*40.00 DLH423
CHR119 TOUGHPLY CHAIR" R*50.00 GUR023
CLK213 PRIMA WALL CLOCK R*250.00 DLH423
FAN12 GODRE#FAN R*300.00 DLH12
FAN227 KHETAN FAN R*360.00 DLH12
FRG217 !PL REFRIGERATOR R*1/000.00 NOD234
OVN13 CHEF OVEN R*13/000.00 DLH423
TLT114 "UN"HINE
TU!ELIGHT"
R*100.00 DLH12
TV23 !PL TELEVI"ION R*15/000.00 NOD234
TV29 LG TELEVI"ION R*15/400.00 NOD234
WRD23 KITPLY WARDRO!E" R*7/000.00 GUR023
W"M52 LG WA"HING MACHINE R*1/000.00 NOD234
!. Add the following data to the "upplier Table
SUPPLIER
CODE
SUPPLIER NAME PHONE ADDRESS1 ADDRESS2 CITY PINCODE
DLH12 CRE"CENT HOME
APPLIANCE"
26932 23/A CHANDANI
CHOWK/
DELHI
DELHI 11002
DLH423 CITY LIGHT
ELECTRICAL"
679435 23 NEHRU
PLACE
NEW DELHI 110019
GUR023 G " ELECTRICAL
"UPPLIER"
634174 "ECTOR 14 MAIN
MARKET
GURGAON 122001
NOD234 EVER"HINE
FURNITURE
345921 12 "ECTOR 30 NOIDA 113543
#. Create the following $ueries
%et the telephone number and address of the customer "an&a' ande'.
"how the customer details of all the customers who have not paid but the product is
delivered.
(ow man' orders are placed b' customer called )a'uri.
*rite a $uer' to find out which customers have placed an order for +% Television,
+% washing machine or -hetan fan, but who have not paid the amount for the
product.
*rite a $uer' to -now which suppliers to contact for all the orders placed b' )a'uri
.. *or-ing with action /ueries.
(andling batch updates: Increase all prices b' 012 i.e. update rice per unit b'
012.
)a-e table $ueries: At the end of the month run a $uer' giving the details of that
months orders.
arameter $uer': To get the details of an' customer.
3eleting and archiving records: )a-e a table with a criteria and then delete the
records.
4. Create five more $ueries and run the same.

Das könnte Ihnen auch gefallen