ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Keys in RDBMS
ฝัง
- เผยแพร่เมื่อ 16 ส.ค. 2024
- DBMS: Keys in RDBMS
Topics discussed:
1. Explanation about the need for having keys in tables.
2. Various keys involved in DBMS.
3. Super key with example.
4. Candidate key with example.
5. Primary key with example.
6. Alternate key with example.
7. Unique key with example.
8. Foreign key with example.
Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
Contribute: www.nesoacadem...
Memberships: bit.ly/2U7YSPI
Books: www.nesoacadem...
Website ► www.nesoacadem...
Forum ► forum.nesoacad...
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#DBMSByNeso #DBMS #KeysInDBMS
1000 times better explanation than our college teachers.. 👍
Which university
True
I m from non tech background and this topics comes in my Mba course and you explain it very smoothly. thank you !
from where are u pursuing mba? is it mba in IT?
@@debasisnath9951 yes, From GL Bajaj institute greater Noida
Clear explanation indeed .
@@Hey_Haroon Email in alone is superkeu? Because it has null row
The session is too engaging ,Sir. Got cleared with all the concepts🙂.Thankyou sir
Oh my goodness. You explained the complex Lecture to a lay_man's view. I subscribed right away. Sending love from Zambia
🇿🇲🇿🇲🇿🇲🇿🇲🇿🇲
1.75 X club
you explained it 10/10, thank you so much!
Such a great teacher with clean and clear explanation! thank you!
Thank you for the explanation. Your explanation really helped in clearing the concepts regarding the keys.👍Great work!
Thank you for giving the knowledge about DBMS Keys ❤
Precise And to the point.Well done 👍
It is not that difficult , it was just clarity i needed. Thank you
If one name is repeated twice and both the rows have null as their phone number then how will {name, phone} be a super key?
{name, phone} is not a key because u can't identify a unique tuple by using this in that condition
@@Kanna12377for the super key u said like we can use name, phone as key right … that eg is coming for all candidate key primary key and alternative key.. then how come u r saying it’s not a keys
It is candidate key
First you should make name and phone number as a key because it's not null but it's not not unique also
Am also confused😢
really! understood very clearly , mainly this session has been too engaging without lag.
clears all the concept about keys
thank you for speaking clearly, finally found a video in which i can understand what its said
seriously better than my professor!!!
Nicely explained , Thnxx alot 💙
@nesoacademy, are you sure that (Name, Phone) can be super key and candidate key?
In "super key" part you've mentioned that you can not force an employee to have a phone number, so it can be null.
What if we have in DB three employees named John without assigned phone number? 🤔🤔🤔
we need an answer to this, @funkiel-nowka if you found out can you explaine to me aswell ?
@Neso Academy
Even (Name, email) can't be a superkey coz what if email is Also null and the name might have repeated too...
You're right! I have the same doubt. Most probably, that part of the explanation is wrong.
Thank you very much for the video. I have a question, why are we picking {Name, phone} and {email} as candidate keys instead of {Name, email} and {Phone}?
Thanks very clear explanation
Wow, appreciate you for this.
one thing i would like to add is that...
(name + phone) cannot be a candidate key because they can have null values and the primary motive of candidate key is to uniquely identify a tuple. (name + phone) cannot be a primary key as well because primary key can't have null values.
Very nicely explained
Beautifully explained, thank you!
Very very clear, really useful, wonderful explanation.great mentor u r sir, pls put more videos regarding dbms sir 🙏🙏🙏
Well understood, Thanks❤
Thanks for a lot
very clear explanation. thank you
Great lacture thank you for making such wonderful video .
Fantastic... Teaching..Great Sir Thank you sir
excellent work sir, thank you!
Great teacher !!!
Great Explaination Sir !!!!
Simple and effective explanation. Thank you
You are a great teacher
Thanks NESO academy for this! Indeed and infromative video !
Thanks !
Thank you so much sir 😃😃👌
100/10 ❤
Thank you sir 😊
Where is the tutorial of Normalization? I need it right now hehe, were done at keys in rdbms
Super explanation 👌👌👌
thank you i learnt alot from your work
😃😃😃😃😃😃
Thank you so much!
In a candidate key what if one attribute values are not unique and other attributecan have a null value, How can we identify it...For example there are 3 john in the table and if two have no phone numbers then how can we identify the specific tuple
Thank you for the very clear explanation. Just a question: at 11:50 you are considering among candidate keys also {Name, Phone} but according to definition, candidate key is a minimal set of attributes to be key. Since we have already considered {ID} and {SSN} as keys, minimal set of attributes to be key is 1, while in the case {Name, Phone} set of attribute is 2, which is greater. So why do we consider {Name, Phone} still as candidate key?
"minimal set of attributes" it implies that if you remove an attribute from it, it's no longer a key. minimal doesn't mean number of attributes, implies no extra attributes
Nice explanation 💥💥💯
wonderful!!thanks,i understand it 100%😂
great teacher😊
Can someone please explain what is a unique key because it seemed same as alternate keys
Email in alone is superkeu? Because it has null row
(Name, email) what if the email is Null but the name alone cannot identify uniquely a tuple? In my opinion in this case it cannot be a superkey
Yess....even (Name, phone) can't be a super key...the phone no. Can also be null and the name can be repeated too...ig we hv to assign these attributes with certain keys separately....
You can add one thing here that is unique key allow only one null value....not more than one
how name and phone can be super key if there are 2 employees with same name and having null in their phone number field.
Thank you sir for nice explanation ❤️
Thankyou sir ✨
super key is like super set.but actually it is power set of keys
If a column does not uniquely identify a tuple..it can't be a key...then how can u say email I'd can be a super key while it can contain null value
Thank you !
Sir could you post SQL tutorial
Thank You
Unique key can b id or ssn right.. how come name, phone will be unique key
I have the same question how the phone number can be a unique key? There could be multiple nulls.
Let's assume a airplane reservation system. What can be a primary key? Flight Number or Flight Number+Date
I think both can act as a primary key but according to lecture " primary key should never and rarely be changed " 15:55 So there may be chance of date not mentioned (null) so flight number will definitely be a primary key.
So, the unique key, must support null values apart from being unique ?
Thanks
So, super key is set of all possible combinations of attributes that can uniquely identify tuples. Is it right?
Composite key at 19:28
12:41 here , (salary and phone) too.
Thankyou sir ❤❤❤❤😊😊😊
Is it possible for a unique and composite key to be something other than a candidate key?
Thank you
Thanks bro
Lecturer key loves names like yusuf, alya, John , Robin etc.
why is salary on the table if you dont make use of it? Why is it not an alternate key?
Great
Which one was the foreign key ??? Dept. Code or any other ??
In the super key what if two employees having same name both don't have phone number , how will you uniquely edit their data
Then it is not a super key, a super key should have attributes that are uniquely identifiable for each entry
How can {Name, Phone} uniquely identify a tuple? Phone is nullable, right?
I think we can set it to NOT NULL
l think Name and Phone togather cant be a super key, cause we can have two Johns that dont have phone numbers! please correct me if im wrong
phone no is unique also it is can be null so it is super key i think
How can the set {Name, Phone} be a super key if multiple people can have the same name and not every person has a phone number?
Super key is possible of all combinations even null attributes can be used
Phone number alone and with others can be made super key but name won't !
Ask ChatGpt after providing some attributes to it
nandri thale
😂😂
Mass bro nee 😂
Primary key --> PK
PK is unique, NOT NULL, required , never duplicate and used for uniquely identify the data in table.
every table have a max 1 PK.
create table empinfo(
id number primary key,
ename varchar2(20),
deptid number
);
Unique key --> UK
UK is unique, required, never duplicate and used for uniquely identify the data in table.
table can have more than 1 unique key.
UK allows null.
every null is unique, we can not compare null to another null. thats why UK allows null, because it treats every null as unique.
10+null = null
10- null = null
null is unknown and undefined, we do not know the value, so it always gives us null
at 19:19 name is not a unique key phone is a unique key and you are saying that set of name and phone is unique key, what if two employee of same name don't have phone number.
only phone number is also not a key. multiple employee might have no phone....2ndnot- employees with same name might also have no phone. so 'only name', 'only phone number', 'both name and phone number' are not keys...forget which type...those are not key first
salary also can't be a superkey, right?
Yupp
why email is not unique key> as it is unique and null value
some companies allow employees to have multiple email addresses, or they might have an email alias system where multiple employees share the same email domain. Additionally, allowing null values means that not all employees are required to have an email address, which further complicates setting it as a unique key.
yramirp yek dne: 14:32
can a candidate key have null values?pls anyone reply
Yess...Candidate key attribute can contain null values.
Also know that it does not allow the same value in the attribute field.
8:16
bro in 12:42 {name,email } will come or not ?
No...becoz name attribute has already appeared ...in {Name, phone} so u can't have repeated attributes in candidate keys... same goes for email...see this part again 12:17 ...as u can see the email has also appeared once{Email} so u can't hv it again.
Evatiki keys chepdam Saritha radhu ra😂😂😂😂😂
🎉🎉
12:28
Who’ll say composite key? Me?
it is there at 19:40
Lol
2.4 mil oof
OMG, no no no no!
Why
Koi BCA 2nd Sem se hai