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

Decompose the table - 3nf or bcnf, Decompose the table with the following ...

Decompose the table with the following description and functional dependencies into a set of equivalent tables normalized to 3NF or BCNF. A long-standing international treaty am

What is null, What is NULL? Simply NULL means not in value.

What is NULL? Simply NULL means not in value.

Express types of information available in mysql, Express types of informati...

Express types of information available in MySQL? Information as regards the result of queries:  This includes number of records affected by any SELECT or UPDATE or DELETE st

Define entity integrity and referential integrity, Define entity integrity ...

Define entity integrity and referential integrity.  How does SQL allow specification of  these? Ans: Entity Integrity Rule- If the attribute A of relation R is a prime attribut

Hoework, Farmer Bob, Farmer Jane and Farmer Jose run a cow farming co-op. ...

Farmer Bob, Farmer Jane and Farmer Jose run a cow farming co-op. For every cow they keep the cow’s name, age (or date of birth), breed and numbered plastic ear tag. The each of t

Concurrency executions, Explain TPS concurreny executions stating their adv...

Explain TPS concurreny executions stating their advantages in online business advancement

Basic concept of data base management system, INTRODUCTION Databases a...

INTRODUCTION Databases and database systems have become an essential part of our daily life. We encounter many activities that involve some interaction with a database almost

What is property - properties of a database, What is property - properties ...

What is property - properties of a database ? It is an integrated collection of logically related records. It consolidates separate files into a common pool of data records and

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