Header Ads

What is Relational Algebra

Relational Algebra key super key primary key

What is Relational Algebra

KEYS


A table is a property that expresses any value.

Superkey

It is the ability to define a line by combining any feature or multiple features.

For Example:

Let's be a customer table. This is our table; Find the name, address and age of the client. Which one of these is enough to describe the whole picture? There can not be two customers in the same address. If we have such an acceptance; the customer's name and address are used together. This is a superkey. We can add the customer's age here. This defines the table. To define the table, we need unique combinations.


Candidate key

The candidate is the key. It can not be divided into a smaller superkey.

For Example:

The customer name and address is a superkey. At the same time, this is a Candidate key. Customer name and address can not be divided into a smaller superkey. This is a candidate key because it can not be divided.

Primary key


We choose one of the candidate keys. This is the super key we chose. Superkey and Candidate key tables are also given. But we choose Primary key.

No comments

Powered by Blogger.