0% found this document useful (0 votes)
79 views

CGS2545 - Assignment 4

1. A relational database stores data in a collection of tables. 2. SQL is a standardized language used to define and manipulate relational database structures and data. 3. The SELECT keyword is included in most data retrieval statements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

CGS2545 - Assignment 4

1. A relational database stores data in a collection of tables. 2. SQL is a standardized language used to define and manipulate relational database structures and data. 3. The SELECT keyword is included in most data retrieval statements.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

WebCT Assignment #4

1. A(n) _____ database is one where data are stored in a collection of tables.
A. hierarchical
B. relational
C. network
D. object-oriented
2. Which of the following is a prpose of the !"# !tandard$
A. %o specif& s&nta' and se(antics of !"# data definition and (aniplation.
). %o specif& (ini(al and co(plete standards* which per(it different degrees of
adoption in prodcts.
C. %o define the data strctres and basic operations for !"# databases.
D. All of the above
+. %he benefits of a standardi,ed relational langage inclde-
A. application longe.it&
). redced training costs
C. cross-s&ste( co((nication
D. all of the above
/. Which ke&word is 01% inclded in (ost data retrie.al state(ents$
A. !2#2C%
B. AS
C. W3242
D. 5416
7. %he !"# co((and _____ adds one or (ore new col(ns to a table.
A. create table
). create .iew
C. create relationship
D. alter table
8. 5nctions inclde
A. 6A9* !:6* and A0D
). A;<* =5* and C1:0%
C. COUNT, SUM, an A!"
D. C1:0%* 6=0* and 14
>. =n a basic !2#2C% state(ent* _____ deter(ines which tables or .iews will be sed in
the ?er&.
A. 14D24 )@
). W3242
C. #$OM
D. 3A;=0<
A. What does the following !"# state(ent do$
Alter %able Csto(er_% Add (%&pe ;archar (2))B
A. Alters the table Csto(er_% b& adding a 2-b&te field called C;archarC
). Alters the table Csto(er_% to be a %&pe 2 ;archar
C. Alters the table Csto(er_% to accept %&pe 2 ;archars
D. Alters the C%stomer&T table, an as a fiel 'alle (T)*e(
D. =n a basic !2#2C% state(ent* _____ sets the criteria of the ?er&.
A. 14D24 )@
). <41:E )@
C. 3A;=0<
D. W+,$,
1F. =n a basic !2#2C% state(ent* _____ is sed to categori,e reslts.
A. W3242
). 3A;=0<
C. "$OU- B.
D. 14D24 )@
11. %o keep dplicate .ales fro( being retrned* se the D=!%=0C% ke&word.
A. T$U,
). 5A#!2
12. Data integrit& can be ensred thorgh which pdates$
A. !elect* set nll* and cascading pdates
B. Cas'aing, set n%ll, an restri'te %*ates
C. 4estricted* !elect* and set nll pdates
D. Cascading* restricted* and select pdates
1+. A database is (aintained and ?eried throgh the data (apping langage (D6#).
A. T$U,
). 5A#!2
1/. =n a !"# state(ent which of the following parts states the conditions for row selection$
A. <rop )&
B. Where
C. !elect
D. 5ro(
17. What does the following !"# state(ent do$
!2#2C% G 5416 Csto(er W3242 Cst_%&pe H C)estCB
A. !elects all the fields fro( the Csto(er table for each row with a csto(er
labeled G
). selects fields with a C
G
C in the( fro( the Csto(er table
C. selects the C
G
C field fro( the Csto(er table for each row with a csto(er
labeled CbestC
D. sele'ts all the fiels from the C%stomer table for ea'h ro/ /ith a '%stomer
labele (best(
18. What reslt will the following !"# state(ent prodce-
!elect A.g(standard_price) as a.erage fro( prodct_.B
A. the a.erage of all prodcts in prodct_.
B. the average stanar&*ri'e of all *ro%'ts in *ro%'t&v
C. the a.erage price of all prodcts
D. 0one of the Abo.e
1>. Which is 01% an ad.antage of a standardi,ed relational langage like !"#$
A. Application longe.it&
). 4edced training costs
C. 4edced dependence on a single .endor
D. #i0ing efi'ien'ies is relativel) eas)
1A. Which of the following ?estions is answered b& the !"# state(ent$
!elect Cont (Erodct_Description) fro( Erodct_%B
A. 3ow (an& characters are in the field na(e CErodct_DescriptionC$
B. +o/ man) ifferent *ro%'t es'ri*tions are in the -ro%'t Table1
C. 3ow (an& different col(ns na(ed Cprodct Description are there in table
Erodct_%$
D. 3ow (an& prodcts are in the Erodct %able$
1D. What reslts will be prodced b& the following !"# ?er&$
!elect s((standard_price) as total_price fro( prodct_.
where prodct_t&pe H IW11DIB
A. the total *ri'e of all *ro%'ts that are of t)*e /oo
). the standard_price of the first wood prodct in the table
C. the standard_price of an& wood prodct in the table
D. the total price of all prodcts
2F. Which of the following will prodce the (ini(( of all standard prices$
A. select (in(standard_price) fro( prodct_. where standard_price H
(in(standard_price)B
B. sele't min2stanar&*ri'e3 from *ro%'t&v4
C. select standard_price fro( (in(prodct_.)B
D. select standard_price fro( prodct_. where standard_price H (inB
21. Which of the following is the wildcard operator in !"# state(ents$
A. All fiels /ill be sele'te from the -ro%'t table for *ro%'ts that have a
5%antit) of 6.
). All fields will be selected fro( the Erodct table for prodcts that ha.e a ?antit&
of onl& 2.
C. All fields will be selected fro( the Erodct table for prodcts that ha.e a ?antit&
of 1 and 2.
D. 0one of the abo.e
22. Which of the following is tre abot the !"# state(ent$
!elect
G
5ro( Erodct Where "antit& H 1 1r "antit& H 2
A. All fiels /ill be sele'te from the -ro%'t table for *ro%'ts that have a
5%antit) of 6.
). All fields will be selected fro( the Erodct table for prodcts that ha.e a ?antit&
of onl& 2.
C. All fields will be selected fro( the Erodct table for prodcts that ha.e a ?antit&
of 1 and 2.
D. 0one of the abo.e
2+. A join where co((on (redndant) col(ns appear in the reslt table.
A. 1ter join
). 0atral join
C. ,5%i78oin
D. :nion join
2/. A join where co((on (redndant) col(ns appear in the reslt table.
A. 1ter join
). 0atral join
C. ,5%i78oin
D. :nion join
27. =n !"#* a _____ sb?er& is a t&pe of sb?er& in which processing of the inner ?er&
depends on data fro( the oter ?er&.
A. paired
B. 'orrelate
C. inner
D. natral
28. A t&pe of ?er& that is placed within a W3242 or 3A;=0< clase of another ?er& is
called a-
A. 6aster "er&
B. s%b5%er)
C. sper?er&
D. (lti-?er&
2>. A transaction is a set of closel& related pdate co((ands that (st all be done or
none of the( done in order for the database to re(ain .alid.
A. T$U,
). 5A#!2
2A. %he data dictionar& holds sefl infor(ation pri(aril& for the database ad(inistrator.
A. %4:2
B. #A9S,
2D. A _____ _____ is a te(porar& table sed in the 5416 clase of an !"# ?er&.
A. correlated sb?er&
B. erive table
C. .iew table
D. none of the abo.e
+F. _____ takes a .ale of tre if a sb?er& retrns an inter(ediate reslts table which
contains one or (ore rows.
A. =n
). 2'tents
C. ,0ists
D. 3a.ing
+1. %he :0=10 clase is sed to-
A. 'ombine the o%t*%t from m%lti*le 5%eries into a single res%lt table.
). join two tables together to for( one table.
C. find all rows that do not (atch in two tables.
D. 0one of the abo.e
+2. D&na(ic !"# is the process of inclding hard-coded !"# state(ents in a progra(
written in another langage.
A. %4:2
B. #A9S,
++. When a _____ occrs* changes to a table are ndone.
A. co((it
B. rollba':
C. atoco((it
D. pdate
+/. 2stablishing =5-%320-2#!2 logical processing within an !"# state(ent can be
acco(plished b&-
A. %sing the CAS, :e)/or in a statement
). sing the if-then-else constrct
C. sing a sb?er&
D. sing the i((ediate if state(ent
+7. _____ is central to (ost =nternet database applications
A. D)nami' S;9
). !"#JE!6
C. 1#AE
D. 2(bedded !"#
+8. =n order for two ?eries to be :0=10-co(patible* the& (st-
A. both ha.e the sa(e n(ber of lines in their !"# state(ents.
). both retrn at least one row
C. all of the abo.e
D. both o%t*%t 'om*atible ata t)*es for ea'h 'ol%mn an ret%rn the same
n%mber of ro/s.
+>. What reslts wold the following !"# state(ent prodce$
!2#2C% owner* table_na(e fro( dba_tables where table_na(e H CC:!%1624CB
A. a list of the o/ner of the '%stomer table
). a list of all csto(ers in the csto(er table
C. a list of the owner of the csto(er table as well as csto(ers
D. an error (essage
+A. 2'plicit co((ands to (anage transactions are needed when-
A. a transaction consists of jst one !"# co((and.
B. m%lti*le S;9 'ommans m%st be r%n as *art of a transa'tion.
C. atoco((it is set to off
D. none of the abo.e
+D. :ser defined datat&pes-
A. can be a sbclass of a standard t&pe.
). can beha.e as an object.
C. can ha.e defined fnctions and (ethods.
D. can ha.e all of the abo.e
/F. 2'tensions defined in !"#-DD that inclde the capabilit& to create and drop (odles of
code stored in the database sche(a are called-
A. stored procedres
B. *ersistent store mo%les
C. flow control (odles
D. none of the abo.e
/1. A na(ed set of !"# state(ents that are considered when a data (odification occrs
are called-
A. stored procedres
). trapdoors
C. triggers
D. treat(ents
/2. An interacti.e co((and that can be sed to d&na(icall& control a ser session for
appropriate integrit& (easres is-
A. rollback
B. set a%to'ommit
C. rollforward
D. e'pnge
/+. When creating tables sing the C42A%2 %A)#2 state(ent* 01% 0:## constrains an
attribte fro( being assigned a(n) _______ .ale.
A. foreign
B. n%ll
C. non ke&
D. none of the abo.e
//. A join operation
A. brings together data fro( two different fields.
B. 'a%ses t/o tables /ith a 'ommon omain to be 'ombine into a single
table or vie/.
C. cases two disparate tables to be co(bined into a single table or .iew.
D. is sed to co(bine inde'ing operations.
/7. _____ takes a .ale of tre if a sb?er& retrns an inter(ediate reslts table which
contains one or (ore rows.
A. =n
). 3a.ing
B. ,0ists
D. 2'tents
/8. %he following !"# state(ent is an e'a(ple of _____ sb?er&-
select first_na(e* last_na(e* total_sales fro( sales(an s1
where total_sales K all (select total_sales fro( sales(an s2
where s1.sales(an_id LH s2.sales(an_id)B
A. ncorrelated
B. 'orrelate
C. doble
D. si(ple

You might also like