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

Prepare an erd for the scenario, Question: (a) Prepare an ERD for the s...

Question: (a) Prepare an ERD for the scenario given below. (b) Convert the ER diagram produced in (a) above into its physical design. You have to choose an appropriate Pri

In an e-r diagram an entity set is represent by, In an E-R diagram an entit...

In an E-R diagram an entity set is represent by? In an E-R digram entity set is represted by rectangle.

Difference among a database schema and a database state, What is the differ...

What is the difference among a database schema and a database state? The collection of information stored in database at particular moment in time is known as database state a

Order by clause-data manipulation language, Order by clause By usin...

Order by clause By using this rows can be sorted It is used in the last portion of select statement By default it gets ascending order DESC: is used

RDBMS, what is RDBMS? how it works? good example.

what is RDBMS? how it works? good example.

Query to list the employee name have 10000 salary, Consider employee table ...

Consider employee table of (i) and list names of department(s) for which average salary for department is more than 10,000. (SELECT d_name FROM dept WHERE d_code IN (SELECT d_c

Which model is record based logical model, Which model is record based logi...

Which model is record based logical model? Network Modelis basically known as record based logical model.

What is meant by normalization of data, What is meant by normalization of d...

What is meant by normalization of data? It is a process of examining the given relation schemas based on their Functional Dependencies (FDs) and primary key to achieve the prop

Shared lock or read lock, Shared lock or Read Lock It is requested ...

Shared lock or Read Lock It is requested by a transaction that needs to just read the value of data item. A shared lock on a data item does not permit an exclusive lock

Differance between unordered and ordered file, Differance between Unordered...

Differance between Unordered and ordered file ? Unordered file do no has any sequence although ordered file has arranged in a few sequence and data are assigned in ordered form

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