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

Define deadlock avoidance, Define Deadlock avoidance These protocols a...

Define Deadlock avoidance These protocols as well ensure that the system will never enter a deadlock state although the way it is done is different from deadlock prevention. I

What is the function of sql server agent windows service, What is the funct...

What is the function of SQL Server Agent Windows service? - It's a Windows service that handles tasks scheduled within SQL Server environment. These tasks are also known as job

Define the term domain, Define the term Domain. For each n every attrib...

Define the term Domain. For each n every attribute there is a set of permitted values known as the domain of that attribute.

Control as a state machine engine, Control as a State Machine Engine F...

Control as a State Machine Engine First let us define the state machine: "the state machine is a machine which is an object but not an application object. It is a part of lang

Entity integrity, Before defines the second type of integrity constraint, v...

Before defines the second type of integrity constraint, viz., Entity Integrity, we should be well-known with the concept of NULL. Mostly, NULL is intended as a basis for dealing

How does query tree represent relational algebra expression, How does a que...

How does a query tree represent a relational algebra expression?  Discuss any three rules for query optimisation, giving example as to when should each rule be applied.     Ans

Explain data dictonary on oracle, Explain data dictonary on oracle ? Da...

Explain data dictonary on oracle ? Data Dictionary - Data dictionaries are the system tables in which contain descriptions of the database objects and how they are structured.

What is secondary index, What is Secondary Index While making the index...

What is Secondary Index While making the index, generally the index table is kept in the primary memory (RAM) and the main table, because of its size is keeps in the secondary

Define Fifth Normal form is concerned with, Define Fifth Normal form is con...

Define Fifth Normal form is concerned with Ans : Fifth Normal form is concerned with Join dependency.

What do you understand by data ware house, Question 1: Define the term ...

Question 1: Define the term business intelligence tools? Briefly explain how the data from one end gets transformed into information at the other end? Definition Exp

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