Results 1 to 6 of 6
Like Tree2Likes
  • 2 Post By keepLooking

Thread: Database question

  1. #1
    Executive Member
    Join Date
    Jun 2014
    HSC
    N/A
    Gender
    Male
    Location
    Sydney, New South Wales
    Posts
    1,901
    Rep Power
    4

    Database question

    Not sure if this is the right forum to post up this question. But I had a question like this come up:


    a) List at list 3 databases that you might be a part of (consider databases that you are
    using; or in which your information is stored / can be retrieved etc).
    b) Suggest what the primary key field might be for one table in each database

    My thinking for

    a) Access, SQL and Sybase.

    Not sure how to answer part b)

  2. #2
    Member
    Join Date
    Aug 2014
    HSC
    2015
    Gender
    Male
    Posts
    479
    Rep Power
    3

    Re: Database question

    a) Facebook, Bored of Studies, GMail
    b) First Name, Username, Email Address
    astroman and davidgoes4wce like this.

  3. #3
    Exalted Member BlueGas's Avatar
    Join Date
    Sep 2014
    HSC
    N/A
    Gender
    Male
    Posts
    2,392
    Rep Power
    4

    Re: Database question

    I can't really think of three at the moment but an example of a database is a school database, where all the students records are saved. An example of a primary key will be StudentID, or CourseID but it depends. For example, a student table can be linked to a subjects table and basically a student table can have: StudentID, Student_Name, Student_Surname, CourseID, and the subjects table can have Course_Name, CourseID, No.of students, etc.

  4. #4
    New Member
    Join Date
    Jul 2016
    HSC
    N/A
    Gender
    Undisclosed
    Posts
    5
    Rep Power
    2

    Re: Database question

    Hi, do you mind explaining why first name would be a primary key? There can be many people with the same name.

    I thought a user_id would work for all 3 as it is likely to be just a sequential number that can't clash and it won't cause issues if someone wishes to change email/username/etc.

    Thanks

  5. #5
    Exalted Member BlueGas's Avatar
    Join Date
    Sep 2014
    HSC
    N/A
    Gender
    Male
    Posts
    2,392
    Rep Power
    4

    Re: Database question

    Quote Originally Posted by hindsight2020 View Post
    Hi, do you mind explaining why first name would be a primary key? There can be many people with the same name.

    I thought a user_id would work for all 3 as it is likely to be just a sequential number that can't clash and it won't cause issues if someone wishes to change email/username/etc.

    Thanks
    I didn't say student name would be a primary key though... Like what you said, a User_ID or Student_ID is the primary key (depending on which database you would use).

  6. #6
    New Member
    Join Date
    Jul 2016
    HSC
    N/A
    Gender
    Undisclosed
    Posts
    5
    Rep Power
    2

    Re: Database question

    Ah, okay. Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •