It's UWAweek 47

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 4 articles in this topic
Showing 4 of 684 articles.
Currently 140 other people reading this forum.


 UWA week 36 (2nd semester, mid-semester break) ↓
SVG not supported

Login to reply

👍?
helpful
3:47pm Tue 3rd Sep, Jieh C.

Hi, I would like to know if the case study does not mention about a unique identifier for an entity (e.g. Vehicle Make / Nominated driver), are we allowed to make a unique identifier ourselves (e.g. Nominated Driver ID, etc.)? Thank you.


SVG not supported

Login to reply

👍?
helpful
4:19pm Tue 3rd Sep, Adam W.

Hi Jieh Chia, When identifying primary keys, you may encounter a situation where there are no natural primary keys, or the ones available aren't suitable, so you can essentially make a surrogate key (which is what you're suggesting). A surrogate key is a primary key created by the database designer to simplify the identification of entity instances. Surrogate keys are useful in the following situations: When there is no natural key. When the selected candidate key has embedded semantic contents (or is unusable due to privacy concerns). When the selected candidate key is too long. I hope this helps. Thanks, Adam. "Jieh Chia" <24*1*5*4@s*u*e*t*u*a*e*u*a*> wrote:
> Hi, I would like to know if the case study does not mention about a unique identifier for an entity (e.g. Vehicle Make / Nominated driver), are we allowed to make a unique identifier ourselves (e.g. Nominated Driver ID, etc.)? Thank you.


SVG not supported

Login to reply

👍?
helpful
8:14pm Tue 3rd Sep, ANONYMOUS

Hi, let's say for a certain entity the primary key could be a combination of some attributes which includes a foreign key. In ERD we are not supposed to note down foreign keys so in this case should I create a surrogate key?


SVG not supported

Login to reply

👍?
helpful
3:31pm Wed 4th Sep, Adam W.

Well if the combination of attributes makes up the primary key, then it would be a composite primary key so you would show it as the key. It just also gets partially used by another table as the foreign key so it would just not be labelled as the foreign key, I wouldn't remove it as such. I found this while searching if it helps: key - a minimal set of attributes that uniquely identifies a record (or row) primary key - a single attribute that (a) cannot be null, and (b) uniquely identifies a row. composite key - two or more attributes that, taken together, uniquely identifies a record (or row) foreign key - an attribute in a table that references the primary key in another table. Can be part of a composite key. (Could also be a primary key, though this would mean the 2 entities/tables should be logically combined.) https://opentextbc.ca/dbdesign01/chapter/chapter-8-entity-relationship-model/

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy