You need to ensure that the following requirements are met: The fields must use the minimum amount of space

You develop a database application. You create four tables. Each table stores different categories of
products.
You create a Primary Key field on each table.
You need to ensure that the following requirements are met:
The fields must use the minimum amount of space.
The fields must be an incrementing series of values.
The values must be unique among the four tables.
What should you do?

You develop a database application. You create four tables. Each table stores different categories of
products.
You create a Primary Key field on each table.
You need to ensure that the following requirements are met:
The fields must use the minimum amount of space.
The fields must be an incrementing series of values.
The values must be unique among the four tables.
What should you do?

A.
Create a ROWVERSION column.

B.
Create a SEQUENCE object that uses the INTEGER data type.

C.
Use the INTEGER data type along with IDENTITY

D.
Use the UNIQUHDENTTFIER data type along with NEWSEQUENTIALID()

E.
Create a TIMESTAMP column.



Leave a Reply 6

Your email address will not be published. Required fields are marked *


HR_OS_B

HR_OS_B

The fields must use the minimum amount of space.
B

marcel

marcel

D seems to be ok on is mis spelled uniqueidentifier
B takes less space but is not unique among all tables

Mark

Mark

I would say B.
It takes less space than the UNIQUEIDENTIFIER datatype (16Bytes) vs INT (4Bytes)
It would be unique across whatever calls it, because a SEQUENCE is an independent object, getting its next value with the NEXT VALUE FOR SeqName, defining a constraint on the PrimaryKey of all tables as

ALTER TABLE tname
ADD CONSTRAINT DFT_tname_cname
DEFAULT(NEXT VALUE FOR SeqName) FOR cname;

abc

abc

I agree with Mark

henrov

henrov

Mark’s the man!

klinskoe

klinskoe

B is the correct answer