Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    16

    what sort of key is this on a data model? very basic question!

    Hi, hopefully someone can help me with this. I'm currently working on a data model for a database-design assignment for university. I have to label up my model accurately including all the labels and keys, ie using boxes to represent tables and lines between showing relationships and their cardinality.

    1. I have unique columns for each of my tables called Primary Keys,

    2. I have columns from other tables called Foreign Keys,

    3. But I also have a column which is the Primary Key of a particular table, but it is from another table and so is Foreign... Can anyone tell me the name of this key? and how are they usually marked up or flagged as being both on a model?

  2. #2
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    You can have a key that is both primary and foreign

    (PK) Primary Key

    (FK) Foreign Key

    (PK, FK) Primary Key and Foreign Key.

    Sometimes called a Foreign Primary Key.

    That should do it.
    Last edited by certus; 01-05-04 at 16:18.

  3. #3
    Join Date
    Dec 2003
    Posts
    16
    thanks for your quick response,

    so there is no unique name for a key which is both primary and foreign??!

    I wasn't sure if it was called composite or compound but think that is something else.

  4. #4
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    A foreign primary key.

    (slipped in previous post while adding key's name)

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    You have two tables with a 1 to 1 relationship?

    blindman

Posting Permissions

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