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. how to create relationship between tables based on field

how to create relationship between tables based on field

Scheduled Pinned Locked Moved Database
questiondatabasecomdesigndata-structures
2 Posts 2 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.
  • C Offline
    C Offline
    Cenator
    wrote on last edited by
    #1

    First of all: "Sorry for my english!" I recently have created a calibration database via Ms Access DBMS. Here is the model: https://i.stack.imgur.com/Z2uBf.jpg[^] Each tool has "name abzarLa" field that is actually "Tool's English Name" that comes from ToolList Table. Here is sample values of "ToolList" Table. https://i.stack.imgur.com/cPwSk.jpg[^] now it's time to explain my problem: each Tool based on its "name abzarLa" relates to its specific "Data Table" which contains Calibration data results with specific fields. (One To Many relationship => each tools has multiple row in "Data Table") Here is data table that uses for insert "Pressure gauge" results: https://i.stack.imgur.com/ZEQ7e.jpg [^] And here is data table that uses for insert "Oven", "incubaor", "cold Incubator" results: https://i.stack.imgur.com/4uzOp.jpg[^] Ok, So we have a Tools table and multiple "Data Tables". How can I design "Data Tables" and create relationship between "Tools" table and "Data Tables" base on "name abzarLa" field? One Design is: https://i.stack.imgur.com/6bhdu.jpg[^] but I want each tool only relates with its specific [Data Table]

    Richard DeemingR 1 Reply Last reply
    0
    • C Cenator

      First of all: "Sorry for my english!" I recently have created a calibration database via Ms Access DBMS. Here is the model: https://i.stack.imgur.com/Z2uBf.jpg[^] Each tool has "name abzarLa" field that is actually "Tool's English Name" that comes from ToolList Table. Here is sample values of "ToolList" Table. https://i.stack.imgur.com/cPwSk.jpg[^] now it's time to explain my problem: each Tool based on its "name abzarLa" relates to its specific "Data Table" which contains Calibration data results with specific fields. (One To Many relationship => each tools has multiple row in "Data Table") Here is data table that uses for insert "Pressure gauge" results: https://i.stack.imgur.com/ZEQ7e.jpg [^] And here is data table that uses for insert "Oven", "incubaor", "cold Incubator" results: https://i.stack.imgur.com/4uzOp.jpg[^] Ok, So we have a Tools table and multiple "Data Tables". How can I design "Data Tables" and create relationship between "Tools" table and "Data Tables" base on "name abzarLa" field? One Design is: https://i.stack.imgur.com/6bhdu.jpg[^] but I want each tool only relates with its specific [Data Table]

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      Relationships are defined between tables, not records. Your parent table will need a relationship to all relevant tables. Your query can then join to those tables depending on the data in the parent record.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      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