Db2mock4 Seta

Embed Size (px)

Citation preview

  • 8/12/2019 Db2mock4 Seta

    1/24

    SET A

    1. Which of the following privileges permits a user to create objects within a schema?A. CONTRO

    !. AT"R

    C. R"#"R"NC"$ %. CREATEIN

    &. Consi'er the following scenario. We have a table( table)1( which has onl* one columnstoring an integer value. The following statements are e+ecute' successfull* in the or'ershown,

    CR"AT" $"-"NC" m*)se/ $TART W0T 1 0NCR"2"NT !3 1 CAC" 4

    0N$"RT 0NTO table)1 5A"$ 6N"7T 5A" #OR m*)se/890N$"RT 0NTO table)1 5A"$ 6N"7T 5A" #OR m*)se/89

    After a 'b& terminate an' reconnection to the 'atabase( the following statement was

    issue',

    0N$"RT 0NTO table)1 5A"$ 6N"7T 5A" #OR m*)se/89$""CT : #RO2 table)1

    What value will be the last value returne' b* the /uer*?

    A. 1 !. &

    C. ; %. 6

    ;. Which of the following is NOT true about

  • 8/12/2019 Db2mock4 Seta

    2/24

  • 8/12/2019 Db2mock4 Seta

    3/24

  • 8/12/2019 Db2mock4 Seta

    4/24

    !. CA"" pro&2!2# 3- C. CA proc1618 %. None of the above1&. 0n %!& J.E( which of the following functions can be use' to create tables from 72

    'ocuments?

    A. 4%"TA*"E !. TA!"72 C. 72&R"AT0ONA %. 72&TA!"

    1;. 0f circular logging is use'( the following t*pes of bac

  • 8/12/2019 Db2mock4 Seta

    5/24

    C. & %. ;

    1E. Which of the following is true about Table $paces in %!&?A. A Table $pace is a file manage' b* the operating s*stem where %!& can store 'ata.

    !. A Table Spa&e is always asso&iated with a b'ffer pool.

    C. A Table $pace to store userBs temporar* table 'ata is automaticall* create' when a'atabase iscreate'.

    %. A Table $pace can be manage' b* the 'atabase 6%!&8 or b* an e+ternalapplication.

    1H. Which of the following best 'escribes the a'vantages of e+ecuting a set of %2statements insi'e a single

    transaction?A. The %!2$ recor's those operations in the au'it logs since the* are groupe' insi'e

    a transaction. !. The %!2$ stores the transaction operations so that the client applications can rerunthe transaction

    more easil*.C. The +*%S 'arantees that either all &hanes performed by the +%" arestored# or in &ase of error# the &hanes are 'ndone# leain the database in a&onsistent state.

    %. The %!2$ guarantees that all operations are alwa*s e+ecute' successfull*.

    1J. Which of the following tools can be use' to 'evelop store' proce'ures?A. %!& C=

    !. %!& Comman' "'itor C. 0!2 %ata $tu'io %. All of the Above&. 3our compan* has as

  • 8/12/2019 Db2mock4 Seta

    6/24

    &&. Which of the following is true about Relational %atabases an' the Relational %ata 2o'el?A. A table 'oes not allow 'uplicates an' a relation 'oes.

    !. A 'omain is the smallest unit of 'ata. C. A column is the e/uivalent to a tuple. %. A domain is the set of some possible al'es for a spe&ifi& field

    &;. Which of the following is NOT a %2 statement?A. $""CT !. 0N$"RT C. A"TER %. =%AT"

    &>. iven the following table 'efinition,

    $A"$@@@@@@@@@@@@@@@@@@@@@@@@@@$A"$)%AT" %AT"$A"$)="R$ON CAR6&8R"0ON CAR6&8$A"$ 0NT""RWhich of the following $- statements will remove all sales that occurre' in 1JJ4?

    A..%""T" : #RO2 sales W"R" 3"AR6sales)'ate8 1JJ4 !. +E"ETE $RO% sales ()ERE 8EAR!salesdate- / 299: C. R"2O5" : #RO2 sales W"R" 3"AR6sales)'ate8 1JJ4 %. R"2O5" #RO2 sales W"R" 3"AR6sales)'ate8 1JJ4

    &4. Which of the following best 'escribes the benefits of supporting 7-uer*Bs TRAN$#OR2e+pression in %!&?

    A. It &an be 'sed to modify both 4%" and relational data# proidin a &ommonlan'ae for deelopers n to handle the database data.

    !. When use' in a =%AT" statement( it simplifies the up'ate of 72 'ocumentsstore' in the 'atabase( since all processing is 'one b* the %!& engine. C. 0t is ver* useful to change 72 no'es when the 72 'ocument is loa'e' in theclient application. %. 0t can be use' to automaticall* clean up unnecessar* tags in a 72 'ocument(provi'ing smaller 'ocuments thus saving space in the 'atabase.

    &D. Which of the following statements revo

  • 8/12/2019 Db2mock4 Seta

    7/24

    %. R"#"R"NC"$

    &H. What is the 'efault isolation level in %!& J.E for inu+( ni+ an' Win'ows for new'atabases?

    A. Cursor $tabilit* !. C'rsor Stability with C'rrently Committed semanti&s

    C. ncommitte' Rea' %. None of the above

    &J. Which of the following is true about the 0nformation 2o'el?A. Allows specification of objects in a 'etaile' level.

    !. 0t can 'escribe objects but not the relationships between them. C. 0t is a group of 'escriptions e+plaining objects of a 'ata mo'el. %. %ata mo'els can be use' to map an 0nformation 2o'el to a softwareimplementation

    ;. Assuming that *ou are currentl* connecte' to a %!& 'atabase( which of the followingcomman's will

    terminate *our connection?A. db5 &onne&t reset

    !. 'b& connect en' C. 'b& connect

  • 8/12/2019 Db2mock4 Seta

    8/24

    ;;. Which of the following tools will give *ou the best performance to import large amounts of'ata into a %!&

    table?A. 02=ORT

    !. "OA+ C. #A$T 02=ORT

    %. !F 0N$"RT;>. iven the following table,

    "$T$@@@@@@@@@@@@@@@@@@name age@@@@@ @@@@@Genn* ;>Ro'ne* ;DOliver &1

    Angie >&Tom &H5incenIo &4What names woul' be 'ispla*e' as the result of the following $- /uer*$""CT name #RO2 "$T$ W"R" name 0F" BMo)B

    A. Oliver( Ro'ne*( Tom( 5incenIo !. Ro'ne*( Tom C. Tom %. Oliver( Ro'ne*( Tom;4. Which of the following statements is #A$" about transactions?

    A. Operations insi'e a transaction are e+ecute' in parallel. !. Only 2 CO%%IT statement &an be e

  • 8/12/2019 Db2mock4 Seta

    9/24

    ;H. Which of the following 72 fragment correctl* in'icates the result of the given statementbelow?

    values 672""2"NT 6name Name( 72NA2"$=AC"$6 %"#AT Bhtpp,sample.'efault.nspace.comB8( 72ATTR0!T"$ 6B2A"B as en'er8(

    72CONCAT6 72""2"NT 6name #irstName( BAmitabhB8( 72""2"NT 6name astName( B=atelB8888

    A. =Name htpp?@@sample.defa'lt.nspa&e.&om> ender/>%A"E>B =$irstNameBAmitabh=@$irstNameB ="astNameBPatel=@"astNameB =@NameB

    !. PName +mlnshtpp,sample.'efault.nspace.comQ Pen'erQ2A"Pen'erQ P#irstNameQAmitabhP#irstNameQ PastNameQ=atelPastNameQ PNameQ

    C. PName en'er2A"Q P#irstNameQAmitabh PastNameQ=atelPastNameQP#irstNameQ PNameQ

    %. None of the above

    ;J. Which one of the following $- statements will inline 72 'ocuments smaller than 1b*tes( store' within the "2=0N#O column?

    A. CR"AT" TA!" "2=O3""$ 6empi' char6H8( empinfo 72 inline length61&>88 !. A"TER TA*"E E%P"O8EES A"TER CO";%N epinfo SET IN"INE "ENT)2 C. CR"AT" TA!" "2=O3""$ 6empi' char6H8( empinfo 728 $"T 0N0N0N618 %. CR"AT" TA!" "2=O3""$ 6empi' char6H8( empinfo 72 %"#AT 0N0N"18

    >. iven the following =%AT" statement,=%AT" emplo*ees $"T wor

  • 8/12/2019 Db2mock4 Seta

    10/24

    value in theWORF%"=T column

    >1. The authentication metho' in a %!& server is 'efine' within,A. The 'atabase configuration.

    !. The s*stemBs catalog. C. The %!& registr*. %. The database manaer &onfi'ration.

    >&. 0n embe''e' $-( which of the following is an e+ample of how to establish a connectionto the $A2="

    'atabase in %!&?A. "7"C $- CONN"CT TO $A2="

    !. +*5 CONNECT TO +* SA%P"E C. "7"C CONN"CT TO $A2=" %. "7"C %!& CONN"CT TO %ATA!A$" $A2="

    >;. Which of the following statements is TR"?A. The owner of a table 'oes not automaticall* receive CONTRO privilege for that

    table. !. The owner of a table automaticall* receives CONTRO privilege( but 'oes notautomaticall* receive

    all other table privileges available for that table. C. 0f the CONTRO privilege is revo

  • 8/12/2019 Db2mock4 Seta

    11/24

    >D. Application A is running un'er the Repeatable Rea' isolation level an' hol's an p'ateloc< on table TA!1. Application ! wants to /uer* table TA!1 an' cannot wait for

    Application A to release its locE. Which of the following is a characteristic of igh Availabilit*?A. 0t allows compression of 'ata.

    !. It allows definition of a poli&y to 'arantee D'ality of seri&e to appli&ations. C. 0t allows replication of 'ata to a stan'b* server that can taH. 0f secon'ar* log files are to be allocate' until the unit of wor< commits or storage ise+hauste'( which t*pe of

    logging is use'?A. Circular logging

    !. Archival logging C. Infinite loin %. 0t cannot be 'one in %!&>J. Which of the following options can be use' to chec< the minimum point in time 6=0T8 for atable space

    restore?A. 0$T TA!"$=AC"$ $OW. R"$TOR" A

    ! +ATA*ASE SA%P"E TA*"ESPACE !%8T*SP- $RO% @tbspbkp C. R"$TOR" %ATA!A$" $A2=" TA!"$=AC" 623T!$=8 ON0N" #RO2tbspb

  • 8/12/2019 Db2mock4 Seta

    12/24

    % &4

    Assuming the following results are 'esire',CO)1 CO)& CO)A CO)!

    A 1 A &1

    ! 1& @ @C 1> C &;Which of the following joins will pro'uce the 'esire' results?

    A. $""CT : #RO2 tab1 0NN"R GO0N tab& ON col)1 col)a !. SE"ECT $RO% tab2 "E$T O;TER FOIN tab5 ON &ol2 / &ola C. $""CT : #RO2 tab1 R0T OT"R GO0N tab& ON col)1 col)a %. $""CT : #RO2 tab1 # OT"R GO0N tab& ON col)1 col)a

    41. Which of the following programming languages can be use' to 'evelop applications thatre/uire access to a

    %!& 'atabase?A. Gava

    !. == C. C %. All of the above

    4&. Which %ata 2o'el was create' with the focus of provi'ing better 'ata in'epen'ence?A. $emi@structure'

    !. ierarchical C. Relational %. "ntit*@Relationship

    4;. When creating a %!& 'atabase( which of the following table spaces is NOT automaticall*create'?

    A. ser table space !. ;ser temporary table spa&e C. Catalog table space %. $*stem temporar* table space

    4>. Which of the following is NOT a $-72 function in %!& J.E?A. 72-"R3

    !. 72"70$T$ C. E4ISTS %. 72CA$T44. Which of the following is characteristic 'ifference between Cursor $tabilit* an' Currentl*Committe'?

    A. Rea'er bloc

  • 8/12/2019 Db2mock4 Seta

    13/24

    4D. Two tables are create' b* the following statement

    CR"AT" TA!" color 6 c)i' 0NT""R NOT N =R02AR3 F"3( C)'esc CAR6&88

    CR"AT" TA!" object 6 o)i' CAR6&8( o)'esc CAR6&8( c)i' 0NT""R R"#"R"NC"$ COOR 6c)i'8 ON %""T" CA$CA%"8Which option correctl* 'escribes the change on the two tables after the statementbelow is e+ecute',

    %""T" #RO2 color W"R" c)i' &

    A. Onl* rows in table COOR can be affecte'. !. Onl* rows in table O!G"CT can be affecte'. C. Rows in both &olor and obGe&t with &id / 5 will be deleted. %. No row will be 'elete'.

    4E. Which of the following is NOT a #eature =ac< that can a'' e+tra functionalit* to a %!&server?

    A. A'vance' Access Control !. $torage OptimiIation C. =erformance OptimiIation %. p're4%"

    4H. Consi'er a table TA!1 having the following values,

    TA!1@@@@@@@@@@@@@@@@@CO1 CO&@@@@ @@@@

    A 1! &C ;

    A 1% >C &Which of the following statements can be use' to mo'if* the values in TA!1 so that thefinal content is as follows,

  • 8/12/2019 Db2mock4 Seta

    14/24

    TA!1@@@@@@@@@@@@@@@@@CO1 CO&@@@@ @@@@C ;% >

    A. +E"ETE $RO% TA*2INSERT INTO TA*2 HA";ES !,C,# - INSERT INTO TA*2 HA";ES !,+,# 7-

    !. =%AT" TA!1 $"T CO1 N W"R" CO& 0N 61( &8 C. %""T" #RO2 TA!1 W"R" CO& NOT 0N 6;( >8 %. %""T" #RO2 TA!1 W"R" CO& 0N 61( &8

    4J. Consi'ering the $- statement below( which option best 'escribes what A!$ is,

    =%AT" tb1 $"T col1 A!$6col&8

    A. $tore' =roce'ure !. *'iltJin f'n&tion C. Trigger %. ser %efine' T*pe

    D. What are the entities use' to mo'el 'ata in the Relational 2o'el?A. A collection of instances of entities.

    !. Relations# attrib'tes and t'ples C. A collection of instances of recor' t*pes. %. Table( rows an' columns

    D1. Which of the following is true about Relational %atabases?A. A column can store values of 'ifferent 'ata t*pes.

    !. A table &onsists of &ol'mns and rows. C. Rows 0n the same table can have a 'ifferent set of columns.

    %. Rows are also

  • 8/12/2019 Db2mock4 Seta

    15/24

    %. %RO= #RO2 sales W"R" 3"AR6sales)'ate8 1JJ4D;. iven the options below( which of the following statements can a'' recor's to a table?

    A. A%%R"C !. A%%R"COR% C. INSERT

    %. A%%

    D>. Which of the following is true about columns?A. "ach column consists of one or more recor's

    !. Col'mns are where the indiid'al pie&es of information are stored for ea&hre&ord C. Columns must be 'esignate' a specific 'ata t*pe %. Columns are also

  • 8/12/2019 Db2mock4 Seta

    16/24

    DE. After the following $- statement is e+ecute',RANT A =R050""$ ON TA!" stu'ent TO $"R user1

    Assuming user $"R1 has no other authorities or privileges( which of the followingactions is $"R1 allowe' to perform?

    A. rant all privileges on table $T%"NT to other users.

    !. %rop a view associate' to the table $T%"N. C. %rop the table $T%"NT. %. None of the aboe.

    DH. Which of the following is true about a well@forme' 72 'ocument?A. as one or more root no'es.

    !. Tags can have at most one attribute. C. Always has a sinle do&'ment node. %. "n' tags are optional.DJ. sing %!&Bs C=( to access a remote 'atabase for the first time( it is necessar* to,

    A. #irst catalog the remote s*stem or no'e( an' then catalog the 'atabase within theremote no'e !. #irst register the remote s*stem user in the s*stem catalog( an' then setup a $$communication to the remote no'e C. %!& cannot use 'atabases in remote s*stems unless $3$A%2 authorit* is grante'to the local user %. #irst list all the remote 'atabases with the 'b& list 'atabase 'irector* comman'( an'then select the remote 'atabase from the list

    E. What is the purpose of a %!& Access =lan?A. $- 'evelopers can 'efine Access =lans to tell %!& the best wa* to retrieve the

    'ata from a $- /uer*. !. +es&ribes the order of operations to a&&ess data ne&essary to e

  • 8/12/2019 Db2mock4 Seta

    17/24

    temporar* memor* %. A Table Spa&e is always asso&iated to a *'ffer PoolE;. Which of the following comman's woul' 'elete the $A2=" 'atabase?

    A. 'b& 'rop sample !. 'b& 'elete 'atabase sample

    C. 'b& 'rop sample 'b %. db5 drop database sampleE>. Which of the following $- statements can be use' to remove 'ata from table users,

    A. R"2O5" TA!" users !. %RO= TA!" users C. +E"ETE TA*"E 'sers %. AT"R TA!" users

    E4. Which of the following is NOT part of the 7-uer* #OWR e+pression?A. #OR clause

    !. "T clause C. OR%"R !3 clause %. (IT) &la'se

    ED. Which of the following is a tool to configure automatic 'atabase bac

  • 8/12/2019 Db2mock4 Seta

    18/24

  • 8/12/2019 Db2mock4 Seta

    19/24

    C. $emantic %. Networwork>B967J5L9J276=@telephoneB =@&'stomerinfoB

    %. PcustomerinfoQ PnameQGohn $mithPnameQ

    Pa''r countr*Cana'aQ PstreetQ#ourthPstreetQ

    Pcit*QCalgar*Pcit*Q Pprov@stateQAlbertaPprov@stateQ Ppco'e@IipQ21T &AJPpco'e@IipQ Pphone t*pecellQEEE@444@;;;;PphoneQ Pa''rQ Ptelephone t*pewor1;DPtelephoneQ PcustomerinfoQ

    HE. 0n embe''e' $- co'e( which of the following is true about 'elimiters?A. se' b* the O$ to 'elimit s*stem variable 'eclaration.

    !. se' b* the 'atabase to in'icate the en' of a column. C. se' b* compiler to in'icate the en' of the program. %. ;sed by PRECO%PI"ER to identify S1" statements to be translated.

    HH. iven the following =%AT" statement,

    =%AT" emplo*ees $"T wor

  • 8/12/2019 Db2mock4 Seta

    22/24

    J. 3ou were assigne' the tas< of importing a large amount of 'ata into a %!& 'atabase.Consi'ering *ou must

    have logge' information about the rows importe' an' that *ou want to perform the loa' asfast as possible(

    which of the tools woul' *ou be the best choice for the job?A. %!& 0N$"RT !. %!& 02=ORT C. +*5 "OA+ %. %!& C=

    J1. iven the following two tables

    NA2"$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$T%"NT)NA2" $T%"NT)N2!"R@@@@@@@@@@@@ @@@@@@@@@@@@@@@@Wa*ne retI!obb* ull &;2ario emieu+ DD2ARF$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@NA2" 2ar

  • 8/12/2019 Db2mock4 Seta

    23/24

    Which of the following is the simplest wa* to restrict users from viewing $AAR3information( while still allowing them to see the other values? A. "ncr*pt the tableBs 'ata.

    !. Create a iew that does not &ontain the SA"AR8 &ol'mn. rant a&&essto the iew and reoke a&&ess from the oriinal table.

    C. Revo

  • 8/12/2019 Db2mock4 Seta

    24/24

    A. Creation of a normal table space calle' m*tbsp1 that is manage' automaticall*.!. Creation of a user table space calle' m*tbsp1 that is manage' automaticall*.

    C. Creation of a temporary table spa&e &alled mytbsp2 that is manaeda'tomati&ally. %. This comman' will return an error to the user.

    JH. 0f TA!1 is create' using the following statementCR"AT" TA!" tab1 6 col1 0NT""R NOT N( col& CAR6;8( CON$TRA0NT cst1 C"CF 6col1 in 61( &( ;( >888Which of the following statements will successfull* insert a recor' into table TA!1?

    A. 0N$"RT 0NTO tab1 5A"$ 6( BaB8 !. 0N$"RT 0NTO tab1 5A"$ 6N( BabcB8 C. INSERT INTO tab2 HA";ES !# ,a,- %. 0N$"RT 0NTO tab1 5A"$ 6>( Babc'efhij