• Got a question on how to use our new website? Check out our user guide here!

Database question (1 Viewer)

davidgoes4wce

Well-Known Member
Joined
Jun 29, 2014
Messages
1,884
Location
Sydney, New South Wales
Gender
Male
HSC
N/A
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)
 

BlueGas

Well-Known Member
Joined
Sep 20, 2014
Messages
2,414
Gender
Male
HSC
N/A
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.
 

hindsight2020

New Member
Joined
Jul 27, 2016
Messages
7
Gender
Female
HSC
N/A
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 :)
 

BlueGas

Well-Known Member
Joined
Sep 20, 2014
Messages
2,414
Gender
Male
HSC
N/A
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).
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top