Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399

    Unanswered: question from db2 v9 certification guide

    control question from DB2 v9 certification book:

    in the following SQL statements are execute in the order shown:

    create table orders
    (col1 interger not null,
    col2 varchar(35),
    col3 numeric(5,2));

    create unique index idx_col1 ON orders(col1);

    which of the following describe the resulting behavior?

    A. every COL1 value entered must be unique; whenever the orders table is queried rows should be displayed in order of increasing COL1 values;

    B. every COL1 value entered must be unique; whenever the orders table is queried rows will be displayed in no particular order;

    C....
    D....

    I am pretty sure the correct answer is B, but in the book it is A. Am I crazy?

    The explanation in the book is:
    .. the creation of an index provides a logical ordering of the rows for a table so in this example, rows inserted into the orders table will be ordered COL1 values, in ascending order.
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I sure hope it's not an IBM Press book...
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Dec 2008
    Location
    Toronto, Canada
    Posts
    399
    DB2 9 Fundamentals Certification Guide Exam 730 by Roger E.Sanders
    DB2 9.5/9.7 on Unix/AIX 6.1/Linux

  4. #4
    Join Date
    Apr 2005
    Location
    USA
    Posts
    130
    Probably they might have mistyped it. I agree correct answer is B

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Quote Originally Posted by MarkhamDBA View Post
    rows inserted into the orders table will be ordered COL1 values, in ascending order.
    This statement doesn't make any sense to me. I think it should say:
    keys inserted into the orders index will be....

    rows are inserted using:
    IBM DB2 9.5 Information Center for Linux, UNIX, and Windows


    I also agree Answer B is correct.

    Answer A maybe true if idx_col1 is used to access the table but there is no guarantee...

  6. #6
    Join Date
    Nov 2009
    Posts
    5
    Quote Originally Posted by MarkhamDBA View Post
    control question from DB2 v9 certification book:

    in the following SQL statements are execute in the order shown:

    create table orders
    (col1 interger not null,
    col2 varchar(35),
    col3 numeric(5,2));

    create unique index idx_col1 ON orders(col1);

    which of the following describe the resulting behavior?

    A. every COL1 value entered must be unique; whenever the orders table is queried rows should be displayed in order of increasing COL1 values;

    B. every COL1 value entered must be unique; whenever the orders table is queried rows will be displayed in no particular order;

    C....
    D....

    I am pretty sure the correct answer is B, but in the book it is A. Am I crazy?

    The explanation in the book is:
    .. the creation of an index provides a logical ordering of the rows for a table so in this example, rows inserted into the orders table will be ordered COL1 values, in ascending order.
    u'r right and the answer you are quoted is totally wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •