Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. database design

database design

Scheduled Pinned Locked Moved Database
databasedesignhelp
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rupa Kalluru
    wrote on last edited by
    #1

    Hi everbody, Iam currently working on datbase design. Iam stucked at:If a primary key is assigned in database,I need to know all the foreign key relation of this PK on other tables in that database. please help out on this, thanks in advance, Rupa

    Rupa

    L E R 3 Replies Last reply
    0
    • R Rupa Kalluru

      Hi everbody, Iam currently working on datbase design. Iam stucked at:If a primary key is assigned in database,I need to know all the foreign key relation of this PK on other tables in that database. please help out on this, thanks in advance, Rupa

      Rupa

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Seems to me you need to learn the basics. http://www.htmlgoodies.com/primers/database/article.php/3478051[^] is a series of articles. You should use google [^] to search for Database basics tutorials

      1 Reply Last reply
      0
      • R Rupa Kalluru

        Hi everbody, Iam currently working on datbase design. Iam stucked at:If a primary key is assigned in database,I need to know all the foreign key relation of this PK on other tables in that database. please help out on this, thanks in advance, Rupa

        Rupa

        E Offline
        E Offline
        ednrgc
        wrote on last edited by
        #3

        Primary keys and foreign keys are the backbone for how tables relate to each other.

        1 Reply Last reply
        0
        • R Rupa Kalluru

          Hi everbody, Iam currently working on datbase design. Iam stucked at:If a primary key is assigned in database,I need to know all the foreign key relation of this PK on other tables in that database. please help out on this, thanks in advance, Rupa

          Rupa

          R Offline
          R Offline
          Rupa Kalluru
          wrote on last edited by
          #4

          I need to know the tables which are in related with the same foreign key. Pls do tell the table which constitutes the FK available in the database. Means that IS there any table in the database in SQL SERVER which is having the FK's.sitting in it. Please try to understand the query first,then reply it in more meaning manner

          Surya

          P 1 Reply Last reply
          0
          • R Rupa Kalluru

            I need to know the tables which are in related with the same foreign key. Pls do tell the table which constitutes the FK available in the database. Means that IS there any table in the database in SQL SERVER which is having the FK's.sitting in it. Please try to understand the query first,then reply it in more meaning manner

            Surya

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            If I understand your question properly, you want to be able to find out which tables have FKs pointing to a PK. To do this, you need to look in the tables sysobjects and sysdepends (plus syscolumns for column names). The xtype in sysobjects lets you specify PK for primary keys. I hope that this helps.

            Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world." Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that." Deja View - the feeling that you've seen this post before.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups