Results 1 to 3 of 3

Thread: [RESOLVED] Table relationships

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2009
    Posts
    177

    Resolved [RESOLVED] Table relationships

    HI,
    Can any one help me with this?,
    Iam trying to create a database with the following fields
    LOT NUMBER
    TEST
    GENERATION
    RESULTS

    What Iam trying to do is create a one to many relationship. where I have
    one Lot Numbers and Many test then I want each test to have Many Generations
    And Each Generation to have one result.

    Example
    Lot Number A
    test1,test1,test3, ect.

    TEST1
    GenerationA
    GenerationB
    GenerationC

    GENERTATION A
    Result 1
    GENERTATION B
    Result 2

    any help would be appreciated

  2. #2
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: Table relationships

    Table 1 LotNumbers
    LotNumberId PK Int
    LotNumber Varchar(50)

    Table2 Tests
    TestId PK Int
    LotNumberId FK to LotNumbers
    TestName Varchar(50)

    Table 3 TestGenerations
    TestGenerationId PK Int
    TestId FK to Tests
    TestGenerationName Varchar(50)
    TestGenerationDate DateTime

    Table4 TestGenerationResults
    TestGenerationResultId PK Int
    TestGenerationId FK To TestGenerations
    Result
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Apr 2009
    Posts
    177

    Re: [RESOLVED] Table relationships

    GarryMazzone, Thanks for your reply, this is exactly what I was looking for.

    Monti124

Posting Permissions

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



Click Here to Expand Forum to Full Width