Welcome! Log In Create A New Profile

Advanced

Primary key - assignment 2 ?

Posted by Student08 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Primary key - assignment 2 ?
April 19, 2007 03:24AM
Can anyone please explain to me what the underline and double underline means in the tables for assignment 2.

eg. CHARGES (Patient_Num,Item_Code,Charge)
----------- ---------
---------

1. Are these 2 keys or just one primary key made up of 2 fields?
2. Or maybe a primary and foreign key?

Thanks
Re: Primary key - assignment 2 ?
April 20, 2007 07:30PM
Hmm, I was following the diagram on pg21 of the tut and made all the boldface names primary keys
Re: Primary key - assignment 2 ?
April 21, 2007 12:46AM
It is confusing because in Access table design the only way to show 2 x key icons as they show in the diagram is to make a composite key of two or more fields.

I emailed the lecturers almost 2 months ago and still no answer about this.
Re: Primary key - assignment 2 ?
April 23, 2007 03:50PM
If you analyze it carefully you'll come to the conclusion that both fields represent a combined primary key.

The reason for this is:
- both fields are in fact foreign keys
- there is no primary key defined
Re: Primary key - assignment 2 ?
April 24, 2007 05:00AM
I agree with your conclusion but I still wonder why they have Patient_Num as a single underline and Item_Code as double. Somehow I think they mean different things and I just can't remember why?

It probably does not matter if they are foreign keys or primary keys as a foreign key is a primary key in another table anyway.

How about the other database experts on this forum. Any more ideas?
avatar Re: Primary key - assignment 2 ?
April 24, 2007 08:43AM
I did this course last year, and, if I remember correctly, a single underline = Primary key, double underline = Foreign key.

If you look at the definition and the examples, you'll see that Patient_Num is the primary key for both Charges and Patient tables. Item_Code is your "link" to the Item table.

Somewhere in our notes (or the text book), there was definately an explaination about the single and double underline and about combined Primary keys. I don't have that with me, so, you'll have to go and search for those definitions yourself.

Good luck.

Reanie
Re: Primary key - assignment 2 ?
May 02, 2007 12:24PM
Single underline indicates the primary key.
Double underline indicates the foreign key.
Sorry, only registered users may post in this forum.

Click here to login