Other contributors have said "Types of tables and keys?" is the same question as "What are Different types of keys in DBMS?" If you believe that these are not asking the same thing and should be answered differently, click here

What are Different types of keys in DBMS?

Answer:
primary key :- The attribute or combination of attributes that uniquely identifies a row or record.

Foreign Key:- an attribute or combination of attribute in a table whose value match a

primary key in another table.

Composite key:- A primary key that consists of two or more attributes is known as

composite key

candidate key:- is a column in a table which has the ability to become a primary key.

Alternate Key:- Any of the candidate keys that is not part of the primary key is called an alternate key.

secondary key:- alternate of primary key.
Note: There are comments associated with this question. See the discussion page to add to the conversation.
First answer by Piyush amica. Last edit by Piyush amica. Contributor trust: 8 [recommend contributor recommended]. Question popularity: 21 [recommend question].