Computer Science, asked by vignikhil30, 1 year ago

what is key?explain different types of keys wit examples

Answers

Answered by Đïķšhä
1
A unique key is a set of one or more attribute that can be used to uniquely identify the records in table. Unique key is similar to primary key but unique key field can contain a “Null” value but primary key doesn't allow “Null” value.
Answered by iduduzrudj
6
Keys are fields in a table which participate in below activities in relational database management systems:

To create relationships between two tables.

To maintain uniqueness in a table.

To keep consistent and valid data in database.

Might help in fast data retrieval by facilitating indexes on column(s).

various types of keys, which are listed below with example:-
1. Candidate Key- Employee_Id, License_Number and Passport_Number are candidate keys
- 2-primary Key. -Employee_Id is a primary key of Employee table.
3-Unique Key - heap table
4-Alternate Key. -
License_Number and Passport_Number are alternate keys.
5-Composite Key. - salary table, Employee_Id

6-Super Key - Employee_Id}, {Employee_Id, Employee_Name}, {Employee_Id, Employee_Name, Address} etc.

7-Foreign Key-
Employee_Id (primary key of Employee table ) is a foreign key in Salary table.

if u like my answer please mark me brainliest

iduduzrudj: please mark brainliest
iduduzrudj: ok
Similar questions