Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    16

    Unanswered: Database Design: Line Item

    I am running into trouble designing my database.

    Tables:
    Field:

    Employee
    TechNumber
    First name
    Last Name
    EmployeeType

    BillingLevel
    billinglevel
    description
    percentage

    EmployeeBilling
    TechNumber - from employee
    BillingLevel - From billing level

    Subscriber
    AccountNumber
    Address
    City
    State
    Zip

    Billing - all billing codes in system and our billing price
    billing code
    description
    price

    BillingLevel - each technician has one of 4 billing levels
    billing level
    description
    percentage

    WorkOrder - technicians work orders
    date
    technumber - from employee
    job#
    accountnumber - from customer
    ????????

    The question marks represent where I am stuck. What I want is for the technician to be able to enter their own workorders along with their billing codes and ammounts. What I am running into trouble with is how to set up the line items in the workorder table so that I am not just putting like 10 fields in the work order table (lineitem1, lineitem2, etc.). Is there a way to set this table up so that they can enter as many or as few line items as they wish???
    thanks

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    You have to create another table that will be linked to the Workorders table by a One (Workorders table) to Many (New table) relationship. Each row in the Workorders table can then have one or more rows associated to it in this new table, the ???????? line in the workorders table holding the foreign keys to new table.

    Have a nice day!

Posting Permissions

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