1: | Consider the following instructions/commands/statements: Login to your Linux server as user JDOE su db2inst1 (switch user to db2inst1) CONNECT TO sample USER foo USING bar SELECT * FROM t1
Which table will you select data from?- JDOE.t1
- db2inst1.t1
- foo.t1
- bar.t1
|
2: | Which of the following is not created when you create a database?- IBMDEFAULTBP
- IBMDEFAULTSPACE
- IBMDEFAULTGROUP
- SYSCATSPACE
- IBMTEMPGROUP
|
3: | Which of the following objects will ensure rows are assigned a unique value across multiple tables?- Identity column
- Unique index
- Sequence
- Row ID
|
4: | Which of the following commands will delete all rows from the table t1 without logging?- Truncate table
- Delete * from t1 no log
- Alter table t1 activate not logged initially with truncate
- Alter table t1 activate not logged initially with empty table
|
5: | To ensure that a column can contain only the values T or F, which option should you choose?- Create a unique index on the column.
- Create a check constraint on the column.
- Specify the column as NOT NULL.
- Create a view on the table.
|
6: | When deleting a row from a table that has a primary key defined, which of the following options on a foreign key clause will delete all rows with the same value in the foreign key table?- Restrict
- Cascade
- Drop
- Set NULL
|
7: | Which two of the following can be referenced by a foreign key constraint?- Unique index
- Unique constraint
- Check constraint
- Primary key
- Identity column
|
8: | Given the table created as follows: CREATE TABLE product ( productno INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 0 INCREMENT BY 5), description VARCHAR(50) )
And these statements: INSERT INTO product VALUES (DEFAULT,'banana') INSERT INTO product (description) VALUES ('apple') INSERT INTO product VALUES (300,'pear');
How many rows will be in the table?- 0
- 1
- 2
- 3
|
9: | Consider the following statement. CREATE TABLE wqwq (c1 DECIMAL)
What will the precision and scale be for column c1 ?- Precision = 15, scale = 0
- Precision = 15, scale =15
- Precision = 5, scale = 0
- Precision = 5, scale = 10
|
10: | Which of the following is not a supported type of trigger?- INBETWEEN
- AFTER
- INSTEAD OF
- BEFORE
|
11: | Which of the following does not belong to a database?- Schema
- Logs
- Registry variables
- System catalogs
|
12: | Consider the following statement. CREATE TABLE foo (c1 INT NOT NULL PRIMARY KEY, c2 INT)
How many database objects are created?- 1
- 2
- 3
- 4
|
13: | Consider the following db2nodes.cfg file. 0 mysrv1 0 1 mysrv1 1 2 mysrv2 0 3 mysrv2 1
How many servers are the partitions running on?- 1
- 2
- 3
- 4
|
14: | Which of the following objects cannot be created in a large table space?A. DataA. IndexA. LONG VARCHARA. LOB |
15: | To create the table space ts1 successfully in the database sample , place the following steps in the correct order. 1. CREATE TABLESPACE ts1 PAGESIZE 16K BUFFERPOOL bp1 2. CONNECT TO sample 3. CREATE BUFFERPOOL bp1 SIZE 100000 PAGESIZE 16K
- 1, 2, 3
- 3, 2, 1
- 2, 1, 3
- 2, 3, 1
|
16: | Which of the following objects' definitions can be altered by using the ALTER statement?- Table
- View
- Index
- Schema
|
17: | A package contains which of the following? (Choose all that apply.)- Executable SQL statements
- The access path that the DB2 optimizer chooses to retrieve the data
- A collection of stored procedures and functions
- A list of bind files
|
18: | Tables with the same name can be created within the same database by creating them in which of the following?- Different partitions
- Different partition groups
- Different table spaces
- Different schemas
|
19: | Which of the following can be used to obtain the next value of the sequence seq1 ? (Choose all that apply.)- seq1.nextValue
- NEXTVAL FOR seq1
- NEXT VALUE FOR seq1
- seq1.next
|
20: | Which of the following statements is true?- A user temporary table space is created with the create temporary table statement.
- The creation of a user temporary table space will fail if no system temporary table space is available.
- A user temporary table is created in TEMPSPACE1.
- A user temporary table space is needed so that declared global temporary tables can be declared.
|