Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6892883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:35:23+00:00 2026-05-27T06:35:23+00:00

Can any kind soul clarify my doubts with a simple example below and identify

  • 0

Can any kind soul clarify my doubts with a simple example below and identify the superkey, candidate key and primary key?

I know there are a lot of posts and websites out there explaining the differences between them. But it looks like all are generic definitions.

Example:

Student (StudentNumber, FamilyName, Degree, Major, Grade, PhoneNumber)

So from the above example, I can know StudentNumber is a primary key.

But as for superkey, I’m a bit confused what combination of attributes could be grouped into the superkey?

As for candidate key, I’m confused by the definition given as any candidate key can qualify as a primary key.

Does it mean that attributes such as PhoneNumber are a candidate key and can be a primary key? (Assuming that a PhoneNumber only belongs to one student)

Thanks for any clarification!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:35:24+00:00Added an answer on May 27, 2026 at 6:35 am

    Since you don’t want textbook definitions, loosely speaking, a super key is a set of columns that uniquely defines a row.

    This set can have one or more elements, and there can be more than one super key for a table. You usually do this through functional dependencies.

    In your example, I’m assuming:

    StudentNumber    unique
    FamilyName     not unique
    Degree     not unique
    Major      not unique
    Grade      not unique
    PhoneNumber    not unique
    

    In this case, a superkey is any combination that contains the student number.

    So the following are superkeys

    StudentNumber
    StudentNumber, FamilyName
    StudentNumber, FamilyName, Degree
    StudentNumber, FamilyName, Degree, Major
    StudentNumber, FamilyName, Degree, Major, Grade
    StudentNumber, FamilyName, Degree, Major, Grade, PhoneNumber
    StudentNumber, Degree
    StudentNumber, Degree, Major
    StudentNumber, Degree, Major, Grade
    StudentNumber, Degree, Major, Grade, PhoneNumber
    StudentNumber, Major
    StudentNumber, Major, Grade
    StudentNumber, Major, Grade, PhoneNumber
    StudentNumber, Grade
    StudentNumber, Grade, PhoneNumber
    StudentNumber, PhoneNumber
    

    Now assume, if PhoneNumber is unique (who shares phones these days), then the following are also superkeys (in addition to what I’ve listed above).

    PhoneNumber
    PhoneNumber, Grade, 
    PhoneNumber, Major, Grade
    PhoneNumber, Degree, Major, Grade
    PhoneNumber, FamilyName, Degree, Major, Grade
    PhoneNumber, Major
    PhoneNumber, Degree, Major
    PhoneNumber, FamilyName, Degree, Major
    PhoneNumber, StudentNumber, FamilyName, Degree, Major
    PhoneNumber, Degree
    PhoneNumber, FamilyName, Degree
    PhoneNumber, StudentNumber, FamilyName, Degree
    PhoneNumber, FamilyName
    PhoneNumber, StudentNumber, FamilyName
    

    A candidate key is simply the “shortest” superkey. Going back to the 1st list of superkeys (i.e. phone number isn’t unique), the shortest superkey is StudentNumber.

    The primary key is usually just the candidate key.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We know UML is unified modeling language. So does it can model any kind
Assuming I am not running server side scripting of any kind, how can I
Can any one help me convert the below code to LINQ? Select Catg,Count(*) From
So this one has me stumped; hopefully a kind soul can help me out.
I would like to start an intentchooser for apps which can return any kind
Is there any kind of API that can allow me to manipulate a file
I know that the convention is to do any kind of header in your
In C programming, you can pass any kind of pointer you like as an
I have developed an application where i can download any kind of file from
Simple question and easy points for a kind soul who helps a novice. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.