Sunteți pe pagina 1din 6

DATABASE EXERCISE COSTS

1. 2. Create a database structure to hold the following information below and save as COSTS. Enter the data for COSTS. ITEM ABC DEF !" #$% '( &. ). QUANTITY 10 15 20 &0 &5 COST 100 150 200 250 &00

Create a database structure to hold the following information below and save as COSTS1. Enter the data for COSTS1. ITEM BAC FED !" %$# QUANTITY 15 20 25 &0 COST 12& )5* *5) &21

5.

+e returned item '( to the su,,lier since it did not have the right colour and re,laced it with item (-.. /he 0uantit1 and the cost remained the same. A,,end data in COSTS1 to COSTS. Add the following item to the COSTS file. ITEM BAB QUANTITY 25 COST &50

*. 2.

3.

a. b.

4ort the table COSTS b1 Cost in descending order. 4ave as HIGH COST. 4ort the table COSTS b1 Quantity in ascending order. 4ave as LOW QUAN.

DATABASE EXERCISE COSTS ont!"

5.

Enter the following data in a table called #RODUCTS6 ITEM ABC DEF !" #$% BAC FED !" %$# BAB (-. SERIAL NO. AB12 DE1& !1) #$15 BA1* FE12 !"13 %$15 BA20 (-21

10.

Create a relationshi, between COSTS and #RODUCTS.

DATABASE EXERCISE CLUB


1. Create a database structure to hold the information below and save as CLUB. Create a value list for AGE. 2. Enter the data for CLUB. ID $ 1001 1002 100& 100) 1005 &. LNAME #ose,h 4mith /homas Fahie 7oberts %NAME Ada #oe /om /im #oan AGE 1* 15 12 1* 12 SEX Female 'ale 'ale 'ale Female DUES 100 25 50 &5 35

Create a database structure to hold the information below and save as CLUB1. ID $ 100* 1002 1003 1005 1010 LNAME #ose,h 4mith /hom,son Fahie 7oss %NAME Aaron #ane /a1lor /iffan1 #ohn AGE 12 12 1* 12 15 SEX 'ale Female 'ale Female 'ale DUES *5 30 50 100 30

). 5. *.

#oan 7oberts has now been married and her name is now #oan 7ivers. A,,end the data from CLUB1 into the CLUB file. Add the following new members to the CLUB file6 ID $ 101 1 LNAME 'itchel %NAME Adam AGE 12 SEX 'ale DUES *0

2.

Create a file name ADDRESS and enter the data below6 ID$ 1001 ADDRESS %ower Estate

1002 100& 100)

Carrot Ba1 East End Carrot Ba1

DATABASE EXERCISE CLUB ont!"


2. Create a file name ADDRESS and enter the data below6 & ont!"' ID$ 1005 100* 1002 1003 1005 1010 1011 3. a. b. c. d. 5. ADDRESS %ower Estate East End %ower Estate East End Carrot Ba1 .urcell Estate %ower Estate

4ort the CLUB table b1 LNAME in descending order. 4ave as LAST SORT. 4ort the CLUB table b1 %NAME in ascending order. 4ave as %IRST SORT. 4ort the CLUB table b1 LNAME and %NAME in ascending order. 4ave as LAST%IRSTSORT. 4ort the CLUB table b1 ADDRESS in descending order. 4ave as DES ADDRESS.

Create a relationshi, between the t(o )ain tables.

DATABASE EXERCISE BRANCH


1. Create a database structure to hold the information below and save as BRANCH. Create a value list for STATE. 2. Enter the data for BRANCH. BRANCH Big A,,le .acific 4unset %a9eview .each /ree &. CITY (ew 8or9 %os Angeles 4an Francisco Al,ine Atlanta STATE (8 CA CA /: A $ ON STA%% 15 1) 21 15 5

Create a database structure to hold the information below and save as BRANCH1. BRANCH Bean /own Astro Center /win Cities -ceanview CITY Dallas !ouston 4an Diego Alban1 STATE /: /: CA (8 $ ON STA%% 1* 3 2 *

).

-ur branch in .each /ree; Atlanta has been closed and all staff are transferred to Bean /own; /e<as Branch. A,,end the data from BRANCH1 to BRANCH file. Add the following new branches to the B7A(C! file6 BRANCH +heatland Cairo CITY Decatur 4avannah STATE A A $ ON STA%% 12 25

5. *.

2.

a. b.

4ort the BRANCH table b1 STATE and BRANCH in ascending order. 4ave as SORTB. 4ort the BRANCH table b1 $ o* STA%% in descending order. 4ave as SORTC.

c.

4ort the BRANCH table b1 CITY in ascending order; then b1 STATE in descending order. 4ave as SORTD.

DATABASE EXERCISE BRANCH ont!"

3.

Create a file name TELE#HONE and enter the data below6 BRANCH Big A,,le .acific 4unset %a9eview .each /ree Bean /own Astro Center /win Cities -ceanview +heatland Cairo #HONE $ 51*=215=&25) 212=&)2=5002 )5*=*2*=3522 5*5=052=&)35 122=2&2=51&) 5*0=555=1212 222=333=1&)5 515=)&2=5*5) &23=)&2=5*5) )25=125=25)3 )&2=&5*=5012

5.

Create a relationshi, between the t(o )ain tables.

S-ar putea să vă placă și