Multiple choice technology databases

You are the database developer for a leasing company. Your database includes a table that is defined as shown here: CREATE TABLE Lease (Id Int IDENTITY NOT NULL CONSTRAINT pk_lease_id PRIMARY KEY NONCLUSTERED, Lastname varchar(50) NOT NULL, FirstName varchar(50) NOT NULL, SSNo char(9) NOT NULL, Rating char(10) NULL, Limit money NULL) Each SSNo must be unique. You want the data to be physically stored in SSNo sequence. Which constraint should you add to the SSNo column on the Lease table?

  1. The UNIQUE CLUSTERED constraint

  2. The UNIQUE UNCLUSTERED constraint

  3. The PRIMARY KEY CLUSTERED constraint

  4. The PRIMARY KEY UNCLUSTERED constraint

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To store data physically in SSNo sequence, you need a clustered index on that column. Since SSNo must be unique (as stated: 'Each SSNo must be unique'), you need a UNIQUE CLUSTERED constraint. The PRIMARY KEY is already defined on Id as NONCLUSTERED, so you can't make SSNo the primary key. A clustered index determines physical storage order.