Explain the terms primary key, candidate key, alternate key, Database Management System

Assignment Help:

Explain the terms primary key, candidate key, alternate key and secondary key. In the given table identify every key?

STUDENT(SID,Regno, Name, City)

Primary Key: The primary key of a relational table uniquely identify every record in the table. It can either be a general attribute (or set of attributes) which is guaranteed to be unique (such as Social Security Number in a table along with no more than one record per person) or it could be provided through the DBMS (such as a globally unique identifier, or GUID, in Microsoft SQL Server).

Candidate Key: A candidate key is a combination of attributes in which can be uniquely used to recognize a database record without any extraneous data. Each table may have one or more candidate keys. One of these candidate keys is chosen as the table primary key.

Alternate Key: An alternate key (or secondary key) is any candidate key that is not selected to be the primary key (PK).

For instance, a relational database along with a table "employee" could have attributes like

"employee_id", "bank_acct_no", and so on. In this case, both "employee_id" and
"bank_acct_no" serve as unique identifiers for a given employee, and could therefore arguably be used for a primary key. Therefore, both of them are known as "candidate keys". If, for example, "bank_acct_no" was chosen as the primary key, "employee_id" would become the alternate key

Secondary Key: Same as above

In above table SID is a primary key, SID and Regno are candidate keys and SIDor Regno are alternate or secondary key.


Related Discussions:- Explain the terms primary key, candidate key, alternate key

An Apriori algorithm, Submission Requirements All answers must be co...

Submission Requirements All answers must be computer generated (including text and diagrams). The hand-in version must include a header page (or with sufficient space)

Why do you go for sorting your query results, Why do you go for sorting you...

Why do you go for sorting your query results? SQL SELECT command to fetch data from MySQL table. Whenever you select rows, the MySQL server is free to return them in any order

North indian plains, i am not clear with the climetic condition of the nort...

i am not clear with the climetic condition of the north indian plain. can u plz explain it for me

Trigger , Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destinat...

Flights(FlightNo, DeptDateTime, Origin, ArrivalDateTime, Destination, Capacity, SoldSeats) Tickets(FlightNo, Seat, CustID) Where - flightNo is the PK of the flights table - DeptDa

#cursor, #what is cursor its uses ? Explain it

#what is cursor its uses ? Explain it

Digital, #floating point representation is used to store

#floating point representation is used to store

State in detail about data flow diagram, What is a Data Flow Diagram?  ...

What is a Data Flow Diagram?  Data Flow Diagram: A data flow diagram is the graph that shows flow of data values from their sources in objects in the course of processes whic

Write a short note on oracle instance, Write a short note on oracle Instanc...

Write a short note on oracle Instance? Oracle Instances: An instance is the (executed) Oracle software and the memory they use. It is the instance which manipulates the data s

Define 2nf normal form, 2NF Normal Form : A relation schema process R i...

2NF Normal Form : A relation schema process R is in 2NF if it is in 1NF and each non-prime attribute A in R is fully functionally related on primary key. Second normal form (2N

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd