You are on page 1of 2

ACC564 Week 8 Homework 1 Chapter 4 4.2 Most DBMS packages contain ata e!

inition" ata manip#$ation" an ata %#er& $ang#ages. 'or each !or the !o$$owing" in icate which $ang#age wo#$ (e #se an wh&. a. A ata(ase a ministrator e!ines the $ogica$ str#ct#re o! the ata(ase. )he DD* + this is the $ang#age #se to e!ine the ata(ase (. )he contro$$er re%#ests a cost acco#nting report containing a $ist o! a$$ emp$o&ees (eing pai !or more than 1, ho#rs o! o-ertime in a gi-en week. )he D.* + this is an e/amp$e o! a %#er& c. A programmer e-e$ops a program to #p ate the !i/e +asset recor s store in the ata(ase. )he DM* + this is the $ang#age #se to act#a$$& process transaction ata an #p ate the ata(ase. . )he h#man reso#rces manager re%#ests a report noting a$$ emp$o&ees who are retiring within !i-e &ears. )he D.* + another e/amp$e o! a task that in-o$-es %#er&ing the ata(ase. e. )he in-entor& seria$ n#m(er !ie$ is e/ten e in the in-entor& recor s to a$$ow !or recognition o! a itiona$ in-entor& items with seria$ n#m(ers containing more than 1, igits. DD* an the DM* + the !ormer to a$ter the str#ct#re" the $atter to make the change. !. A #ser e-e$ops a program to print o#t a$$ p#rchases ma e #ring the past two weeks. )he D.* 0 this $isting can (e pro #ce (& a %#er&. g. An a itiona$ !ie$ is a e to the !i/e +asset recor s to recor the estimate sa$-age -a$#e o! each asset. )he DD* an the DM* + the !ormer to a the !ie$ " the $atter to enter ata in it. 4.1 Aston wants to store the !o$$owing ata a(o#t S2S3s p#rchases o! in-entor&4 5tem n#m(er Date o! p#rchase 6en or n#m(er 6en or a ress 6en or name 7#rchase price .#antit& p#rchase 8mp$o&ee n#m(er 8mp$o&ee name 7#rchase or er n#m(er Description .#antit& on han

8/ten e amo#nt )ota$ amo#nt o! p#rchase a. Design a set o! re$ationa$ ta($es to store this ata. Do a$$ o! the ata items nee to (e store in a ta($e9 5! not" which ones o not nee to (e store " an wh& o the& not nee to (e store 9 (. 5 enti!& the primar& ke& !or each ta($e. c. 5 enti!& the !oreign ke&s nee e in the ta($es to imp$ement re!erentia$ integrit&. Table Name 5n-entor& 7#rchases Primary Key 5tem :#m(er 7#rchase or er n#m(er 5tem n#m(er 7#rchase or er n#m(er 6en or n#m(er 8mp$o&ee n#m(er Foreign Keys 6en or n#m(er 7#rchasing Agent ;emp$o&ee n#m(er< Other Attributes Description .#antit& on Han Date o! p#rchase )ota$ amo#nt o! p#rchase .#antit& p#rchase =nit cost ;act#a$< 8/ten e amo#nt 6en or name 6en or a ress 8mp$o&ee name

7#rchases+ 5n-entor& 6en or 8mp$o&ees

8/ten e amo#nt an )ota$ amo#nt o! p#rchase o not ha-e to (e store in the ata(ase as the& can (e ca$c#$ate !rom other -a$#es. 8/ten e amo#nt is .#antit& p#rchase / =nit cost. )ota$ amo#nt o! p#rchase is the s#m o! a$$ the e/ten e amo#nts !or a$$ items on a partic#$ar p#rchase or er. . 5mp$ement &o#r ta($es #sing an& re$ationa$ ata(ase pro #ct to which &o# ha-e access. 7$ease see Access ata(ase. e. )est &o# speci!ication (& entering samp$e ata in each ta($e. 7$ease see Access ata(ase. !. Create a !ew %#eries to retrie-e or ana$&>e the ata &o# store . 7$ease see Access ata(ase.

You might also like