Computer Science, asked by tanvee70, 2 months ago

Somya has made a database table in MS Access, containing fields like Student_name, Class, Roll_No, and Contact_No. She has set the field ‘Student_Name’ as the primary key.
a) Has she done the right thing by setting the primary key for this field? Give reasons.
b) Which field out of these should be the primary key in your opinion.

Answers

Answered by swatidash2301
18

Answer:

(a) No, she has not done the right thing by setting the primary key for the field ‘stu_name’

(b) names of two or more students can be common. She should set “Roll_no” as a primary key,which is unique to every student.

Hope it helps ☺️

Answered by probrainsme104
3

Answer:

Yes. Because by entering the scholar name you'll proceed to the following information.in fields name we write the name then we add the opposite information of that name entered. student_name can't be the first key because it's always possible that other students with the identical name may join. So, contact number field should be the first key in your opinion.

Explanation:

  • If you're moving existing data into a database, you'll have already got a field that you just can use because the primary key. Often, a novel positive identification, like an ID number or a serial number or code, is a primary key in an exceedingly table. for instance, you may have a Customers table where each customer includes a unique customer ID number. The customer ID field is that the primary key.
  • Access automatically creates an index for the first key, which helps speed up queries and other operations. Access also ensures that each record incorporates a value within the primary key field, which it's always unique.
  • When you create a replacement table in Datasheet view, Access automatically creates a primary key for you and assigns it a field name of "ID" and also the AutoNumber data type.

#SPJ3

Similar questions