Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Identify the primary key in the following table. I am curious as to why the VID_

ID: 3888058 • Letter: I

Question

Identify the primary key in the following table. I am curious as to why the VID_NUM alone is not the primary key as it is unique for every single row?

-Identify Superkey(s) detailrental RENT NUM DECIMAL(8,0) VID NUM DECIMAL(8,0) DETAIL FEE DECIMAL(5,2) DETAIL_DUEDATE DATE DETAIL RETURNDATE DATE (RENT_NUM, VID_NUM, DETAIL_FEE) - Any combination with RENT_NUM, VID_NUM - Candidate key(s) (RENT_NUM, VID_NUM) -No other combination that could be suitable Primary key (RENT_NUM, VID_NUM) Indexes RENT NUM VID NUM DETAIL FEE DETAIL DUEDATEDETAIL RETURNDATE 1001 1001 1001 1002 34342 34366 61353 59237 54325 2.00 3.50 2.00 3.50 3.50 2016-03-04 2016-03-04 2016-03-04 2016-03-04 2016-03-04 2016-03-02 2016-03-02 2016-03-03 2016-03-04 2016-03-09 1003

Explanation / Answer

The detailrental table's primary key should include RENT_NUM along with VID_NUM because it shows the rent data. Although VID_NUM is unique but it does not show data about rent.

So RENT_NUM has been included in Primary Key. The combination of both columns is the ideal choice for primary key.