Sunteți pe pagina 1din 3

Strayer University

CIS 276 Final Examination


March 17, 2014 Name: _________________________
- Choose 20 o 27 test !"estions, each #orth 1$2% &oints '2% &oints (otal)
- Create a text ile "sin* note&a+ an+ sa,e as -o"r last name in lo#ercase$
- Sa,e each !"er- 'an+ res"lts ..) to the text ile 'sa,e oten/)
1$ Create an 012E1S_'-o"r initials) ta3le 3ase+ on the ollo#in*:$
012I2 N0( N455 N4M6E1'4)
012E127(E 27(E
C0MM857N 971C:712'1)
C4S(I2 N0( N455 N4M6E1'6)
S:I827(E 27(E

2$ Create an IN90ICE ta3le 3ase+ on the ollo#in*:
012I2 N0( N455 N4M6E1'4)
I(EMI2 N0( N455 N4M6E1'4)
2ESC1I8(I0N N0( N455 971C:712'20)
8102I2 N4M6E1'6)
7C(47581ICE N4M6E1';,2)
<(= N4M6E1';)
I(EM(0( N4M6E1';,2)
>$ Mo+i- the IN90ICE ta3le to allo# or lon*er 2ESC1I8(I0N names$

4$ Create an IN90ICE_2 ta3le rom the IN90ICE ta3le "sin* a select statement$
%
$
1ename the IN90ICE_2 ta3le to IN90ICE_>$
6$ 7++ a comment to the IN90ICE_> ta3le +einitions +escri3in* the ta3les$
7$ 2ro& the I(EMI2 col"mn rom the IN90ICE ta3le$
;$ Create an IN90ICE_4 ta3le "sin* a s"3!"er- 3ase+ on the str"ct"re o the IN90ICE
ta3le$ Incl"+e onl- the 012I2, 2ESC1I8(I0N, 8102I2 an+ <(= col"mns$ Name
the col"mns in -o"r ne# ta3le IN9 I2, 2ESC1I8(, 8102 I2 an+ <47N(I(=,
res&ecti,el-$

?$ 7++ a irst ro# o +ata to the IN90ICE ta3le #ith +ata o -o"r o#n choosin*$ 2o not
list the col"mns in the INSE1( cla"se$
10
$ 8o&"late the IN90ICE ta3le #ith the sam&le +ata$ =o" are to create the ,al"es to enter
into the ta3le$ (his time, list the col"mns ex&licitl- in the INSE1( cla"se$
012I2, 2ESC1I8(I0N, I(EMI2, 7C(47581ICE, <(=, I(EM(0(,
8102I2

11$ Create a scri&t name+ 5072_27(7_'-o"r initials)$s!l to loa+ ro#s into the
IN90ICE ta3le interacti,el-$ 8rom&t the "ser or the ,al"es $ S&eci- a +ea"lt
,al"e or the <(=$
12$ 8o&"late the ta3le #ith the o"r ro#s o sam&le +ata 3- r"nnin* the scri&t that -o"
create+$
1>$ Chan*e the ,al"e or one o the 2ESC1I8(I0NS$
14$ Create a 81IM71= @E= constraint on the IN90ICE ta3le "sin* the 012I2
col"mn$ (he constraint sho"l+ 3e name+ at creation as a name+ ta3le le,el constraint$
1%$ 7++ a name+ ta3le le,el orei*n Ae- reerence on the IN90ICE ta3le that #ill ens"re
that the 8102I2 is not assi*ne+ to a nonexistent 81024C($
16$
Mo+i- the IN90ICE_> ta3le$ 7++ an 012_27(E col"mn o 27(E +atat-&e$
17$ Mo+i- the IN90ICE ta3le$ 7++ a C:EC@ constraint to &re,ent an-
7C(47581ICE *reater than #hat -o" thinA is a reasona3le le,el$
1;$ Mo+i- the IN90ICE ta3le 3- maAin* one o the col"mns N0( N455$
1?$ Create a ,ie# calle+ IN90ICE_9ie# 3ase+ on o"r col"mns in the IN90ICE ta3le$
4se S<5.854S ormattin* comman+s to create col"mn hea+in*s or the o"r
col"mns$
20
$ 4sin* -o"r ,ie# IN90ICE_9ie#, enter a !"er- to +is&la- ,al"es or three o the o"r
col"mns incl"+e+ in the ,ie#$
21$ Create a ,ie# name+ IN9_9IEB_<4E1= that +oes not allo# an in,oice
2ESC1I8(I0N to 3e chan*e+ thro"*h the ,ie#$

22$ Create a se!"ence to 3e "se+ #ith the &rimar- Ae- col"mn o the IN90ICE ta3le$
(he se!"ence sho"l+ start at 1000 an+ ha,e a maxim"m ,al"e o 2000$ :a,e -o"r
se!"ence increment 3- a sin*le n"m3er$ Name the se!"ence IN90ICE_SE<$ 2o not
allo# the se!"ence to c-cle or cache$
2>
$ Brite an interacti,e scri&t to insert a ro# into the IN90ICE ta3le$ Name -o"r scri&t
6e s"re to "se the se!"ence that -o" create+ or the &rimar- Ae- col"mn$ Create a
c"stomiCe+ &rom&t to enter the 2ESC1I8(I0N$ Exec"te -o"r scri&t$
24$ Create a s-non-m or the IN90ICE ta3le$ 'i no &ri,ile*e, D"st note S<5)
2%$ Brite a !"er- to +is&la- the three col"mns o +ata or all em&lo-ees #ith the same
M7N7EE1_I2 as Erant $

26. Create a !"er- to +is&la- the em&lo-ee n"m3er, last name an+ hire +ate or all
em&lo-ees #ho ha,e a salar- *reater than the a,era*e salar-$ Sort the res"lts in
+escen+in* or+er o salar-$
27$ Create a re&ort containin* the em&lo-ee name, a++ress, cit-, an+ each em&lo-eeFs
salar-$ 5a3el the col"mns #ith a +ierent name than the col"mn name$ 6reaA on
the in+i,i+"al +e&artment n"m3ers$ Create a s&ool ile or this &ro3lem$

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