Computer Science, asked by ashishghildiyal2588, 1 year ago

What is a primary key? Define foreign key? How does it play a role in the join operation?

Answers

Answered by sakshivermajpr1
0

Answer:

Primary key is a key which uniquely identifies each and every record in a table.

Foreign key refers to a primary key or a unique key in another table.

Explanation:

Answered by sunakat483
0

Answer:

In the relational model of databases, a primary key is a specific choice of a minimal set of attributes (columns) that uniquely specify a tuple (row) in a relation (table). Informally, a primary key is "which attributes identify a record", and in simple cases are simply a single attribute: a unique id.A foreign key is a column (or combination of columns) in a table whose values must match values of a column in some other table. FOREIGN KEY constraints enforce referential integrity, which essentially says that if column value A refers to column value B, then column value B must exist.It acts as a cross-reference between tables because it references the primary key of another table, thereby establishing a link between them. A JOIN is used when you extract/query data from the Database by giving rules how to select the data.

Similar questions