Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,665 members, 7,813,231 topics. Date: Tuesday, 30 April 2024 at 09:06 AM

What Are The Candidate Keys? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / What Are The Candidate Keys? (1322 Views)

SSH Keys Generated On Debian Vulnerable / I Doubt If You All Know The Name Of Some Of The Keys On An English Keyboard! / I Am A Learner, Please What Are Primary Keys And How Do I Create Then? (2) (3) (4)

(1) (Reply) (Go Down)

What Are The Candidate Keys? by eazyd(m): 9:52pm On Feb 18, 2012
Please open the attachment to view the table.

Is this correct? Answers to questions like these are based on different views and opinions, so i'm putting this out to see if my views tally with yours.

1a- Studentid--->StudentName
      CourseNumber --->CourseName

1b- Studentid --->StudentName
      Very unlikely because a student can have different studentid.

      CourseNumber --->CourseName
      Very likely because no two  same course can have same course number.

1c- None

1d- The table is not well formed because the determinants (Studentid,CourseNumber) are not candidate keys. Also the table can be broken into 2 tables to be well-formed.

Re: What Are The Candidate Keys? by okeyxyz(m): 5:25am On Feb 19, 2012
1a) is correct.

1b) is wrong. a student cannot have two ids, what u see are two students who happen to have the same names but each can be uniquely identified by her student_id
Re: What Are The Candidate Keys? by eazyd(m): 9:45pm On Feb 19, 2012
@okey

Thanks for your advise but what bout the candidate keys and if the table is well formed or not. Based on functional dependencies i think the table is well formed but in Normalization, the table isn't well formed. What do you think?
Re: What Are The Candidate Keys? by okeyxyz(m): 12:03am On Feb 20, 2012
candidate keys are keys that uniquely identify records, in this case:
studentID for a student table & CourseNumber for a course table.

doing a quick google search suggests that a well-formed table is one that meets the first-normal-form(no repeating columns), so based on that, i'd say it's well-formed.
Re: What Are The Candidate Keys? by eazyd(m): 1:23am On Feb 20, 2012
what about recordid?
Re: What Are The Candidate Keys? by okeyxyz(m): 1:28am On Feb 20, 2012
eazyd:

what about recordid?

it depends on wether it's useful to you or u want to discard it. if it's useful, then it's a candidate key.
Re: What Are The Candidate Keys? by eazyd(m): 2:07am On Feb 20, 2012
im askin for your opinion, do you think its useful?
Re: What Are The Candidate Keys? by okeyxyz(m): 10:24am On Feb 20, 2012
i would't use it for anything. therefore discard!
Re: What Are The Candidate Keys? by niharikaclark: 7:45am On Feb 21, 2012
Candidate key is the set of attribute that is use for make a primary key.a candidate key of a relation is a minimal superkey for that relation

(1) (Reply)

JSTL- Image Download From Mysql Db / Nigeria Verified ( Google Adsense) Or ( Media.net ) Account 4 Sale Contact / Programmers Pls Help A Beginner!

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.