Meet Jain🦅(🛠️,⛓️) Profile picture
21 | Blockchain🔗 | Web3 | DSA |💻 Follow to learn 🚀 Cofounder @0xSaturnHQ_ | Github: https://t.co/e3AtfUSxEk My followers are called Celestials!

Jan 30, 2022, 8 tweets

Types of keys in SQL

A thread🧵

📌Primary key
A primary key is a table attribute or column that identifies every record present in a table uniquely. There can be only one primary key attribute in a table and primary key column attributes can't be the same or null values.

📌Super key
It is the set of all columns which helps to identify rows in a table uniquely.

📌Candidate key
The candidate key is a column or set of columns that can qualify as a primary key in the database. There can be multiple candidate keys in a table and only one candidate key can qualify as a primary key.

📌Composite key
It is the set of two or more attributes that helps to identify each tuple in a table uniquely. Any key such as super, primary, candidate key, etc can be called a composite key if it has more than one attribute.

📌Foreign key
The foreign key is a key used to link two tables together. This is also called as referencing.

If you liked this, make sure to:

1. Follow me @meetjain74

2. Retweet the first tweet

3. Turn on the notifications to never miss these amazing tweets.

Thanks so much for getting to the end of the thread! Let me know your thoughts below

Are you interested in developer tools required for programming or designing or also for building startups?

You should have a look at 100+ developer tools shared by @Vinaystwt 👇vinaystwt.gumroad.com/l/developertoo…

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling