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 relationship problem

Database relationship problem

Scheduled Pinned Locked Moved Database
helpcsharpjavadatabasequestion
4 Posts 3 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.
  • A Offline
    A Offline
    ADY007
    wrote on last edited by
    #1

    hello, i have a problem with the relations between 2 tables. I want to make a table with contacts and another table with websites. I want to have many website for 1 contact! SO 1 contact can have many websites. Can someone help me on this pls? Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.

    C 1 Reply Last reply
    0
    • A ADY007

      hello, i have a problem with the relations between 2 tables. I want to make a table with contacts and another table with websites. I want to have many website for 1 contact! SO 1 contact can have many websites. Can someone help me on this pls? Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      Naturally, the contact table will have a primary key (some sort of ID for each individual contact). The websites table will need to store this key also - but in the websites table it will be a foreign key (because it is the primary key of another table). The websites table will also naturally have a primary key of its own. Is this enough to get you going?


      "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

      A 1 Reply Last reply
      0
      • C Colin Angus Mackay

        Naturally, the contact table will have a primary key (some sort of ID for each individual contact). The websites table will need to store this key also - but in the websites table it will be a foreign key (because it is the primary key of another table). The websites table will also naturally have a primary key of its own. Is this enough to get you going?


        "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question." --Charles Babbage (1791-1871) My: Website | Blog

        A Offline
        A Offline
        ADY007
        wrote on last edited by
        #3

        thanks mate! Now i need to study on ADO.net to make the vb.net communicate with my Database. Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.

        Q 1 Reply Last reply
        0
        • A ADY007

          thanks mate! Now i need to study on ADO.net to make the vb.net communicate with my Database. Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.

          Q Offline
          Q Offline
          QC_2000
          wrote on last edited by
          #4

          Hi Adrian, Are you using some kind of form in your .NET application as a database interface? If so, you can use an oleadapter/sqladapter to connect to your database. The procedure is quite straight forward (there is a Wizard). The data controls are on the Data tab of the Toolbox in the IDE. QC

          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