0% found this document useful (0 votes)
143 views

Database Keys in DBMS

The document discusses different types of keys used in relational database management systems (RDBMS). It defines super key, candidate key, primary key, composite key, secondary or alternative key, and non-key attributes. A super key uniquely identifies each record in a table but may contain unnecessary attributes, while a candidate key can serve as the primary key but one is selected. A primary key uniquely identifies each record and is the main key of a table. A composite key uses two or more attributes as a single key. Secondary keys are other candidate keys not selected as primary. Non-key attributes are not used to uniquely identify records.

Uploaded by

satishgw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
143 views

Database Keys in DBMS

The document discusses different types of keys used in relational database management systems (RDBMS). It defines super key, candidate key, primary key, composite key, secondary or alternative key, and non-key attributes. A super key uniquely identifies each record in a table but may contain unnecessary attributes, while a candidate key can serve as the primary key but one is selected. A primary key uniquely identifies each record and is the main key of a table. A composite key uses two or more attributes as a single key. Secondary keys are other candidate keys not selected as primary. Non-key attributes are not used to uniquely identify records.

Uploaded by

satishgw
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

(http://www.studytonight.

com/)
ONLINE COURSES (http://studytonight.com/online-courses/)

Database

" Without SQL, websites will never have any way to handle Databases for data. "
LIBRARY (http://studytonight.com/library/)

Share
Share

Share
(http://www.addthis.com/bookmark.php?v=

US&s=linkedin&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Fwww.st

STUDYROOM (http://studytonight.com/studyroom/)

key&title=Database%20Keys%20in%20DBMS

14/54468087286d89ba/2&frommenu=1&uid=
FLASHCARDS NEW (http://studytonight.com/flashcards/)

Like

7.5k

concept&tt=0&captcha_provider=nucaptcha)
Share

Home (http://www.studytonight.com/)

Core Java (http://www.studytonight.com/java)

C++ (http://www.studytonight.com/cpp)
Search

DBMS (http://www.studytonight.com/dbms)

LogIn (http://www.studytonight.com/login)

C Language (http://www.studytonight.com/c)

More... (http://www.studytonight.com/library)

SignUp (http://www.studytonight.com/register)
Suggest (http://www.studytonight.com/suggest)
Like
9

74

Database Keys
Keys are very important part of Relational database. They are used to establish and identify relation between

Database Concept

tables. They also ensure that each record within a table can be uniquely identified by combination of one or more

Overview of DBMS

fields within a table.

(overview-of-dbms)
Database Architecture
(architecture-of-database)

Super Key

Database Model (database-

Super Key is defined as a set of attributes within a table that uniquely identifies each record within a table.

model)

Super Key is a superset of Candidate key.

Codd's rule (codd-rule)


RDBMS Concept (rdbmsconcept)
Database key (databasekey)
Normalization (database-

Candidate Key
Candidate keys are defined as the set of fields from which primary key can be selected. It is an attribute or set of
attribute that can act as a primary key for a table to uniquely identify each record in that table.

normalization)
E-R Diagrams (er-diagram)
Generalization and

Primary Key

Specialization

Primary key is a candidate key that is most appropriate to become main key of the table. It is a key that uniquely

(generalization-and-

identify each record in a table.

specialization)
SQL Concept
SQL Introduction
(introduction-to-sql)
DDL Command
Create query (create-query)
Alter query (alter-query)
Truncate, Drop and Rename
query (truncate-droprename-query)
DML Command
All DML command (dmlcommand)
TCL Command
All TCL Command (tclcommand)
DCL Command
All DCL Command (dclcommand)
WHERE clause (whereclause)
SELECT query (selectquery)
LIKE clause (like-clause)
ORDER BY clause (orderby-

Composite Key
Key that consist of two or more attributes that uniquely identify an entity occurance is called Composite key. But
any attribute that makes up the Composite key is not a simple key in its own.

clause)
Group BY clause (groupbyclause)
Having clause (havingclause)
DISTINCT keyword (distinctkeyword)
AND & OR operator (sqland-or-operator)
Advance SQL
SQL Constraints (sqlconstraints)
SQL function (sql-function)
SQL Join (joining-in-sql)
SQL Alias (sql-alias)
SQL SET operation (setoperation-in-sql)

Secondary or Alternative key


The candidate key which are not selected for primary key are known as secondary keys or alternative keys

SQL Sequences (sqlsequences)


SQL Views (sql-views)

Non-key Attribute
Non-key attributes are attributes other than candidate key attributes in a table.

Test Yourself !
If you have studied all the lessons
of DBMS, then evaluate yourself by

Non-prime Attribute
Non-prime Attributes are attributes other than Primary attribute.

taking these tests.

DBMS Topical Test (http://www.studytonight.com/dbms/tests/)


Prev (rdbms-concept.php)

Subjects : Core Java (http://www.studytonight.com/java)


(http://www.studytonight.com/dbms)

C++ (http://www.studytonight.com/cpp)

Next (database-normalization.php)

C Language (http://www.studytonight.com/c)

DBMS

Servlet (http://www.studytonight.com/servlet)

Studytonight 2013 Handcrafted with Love


About Us (http://www.studytonight.com/about) Suggest (http://www.studytonight.com/suggest) Terms (http://www.studytonight.com/terms) Contact Us
(http://www.studytonight.com/contact) Collaborate (http://www.studytonight.com/collaborate/) Blog (http://studytonight.tumblr.com/)

You might also like