Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Posts
    6

    Question proper setup-txn tbl with 2 children

    I have a transaction table. It is basically txn date, txn id, txn type, etc.
    There are multiple txn types. If the txn type is "C" for cash, i have a line items table for cash type pieces of information i.e. currency type, amount, etc. If the txn type is c"R"edit, I have a line items table for things specific to a c"R"edit type transaction. My question is: I can't remember designing (in 3rd normal form), this type of relationship before. Both line items tables are related to the parent by the same field. Is this OK? I want to make sure I don't create a mess for myself when I try to implement this with a user interface, etc.
    Thanks,
    John

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171

    Re: proper setup-txn tbl with 2 children

    Originally posted by john11
    I have a transaction table. It is basically txn date, txn id, txn type, etc.
    There are multiple txn types. If the txn type is "C" for cash, i have a line items table for cash type pieces of information i.e. currency type, amount, etc. If the txn type is c"R"edit, I have a line items table for things specific to a c"R"edit type transaction. My question is: I can't remember designing (in 3rd normal form), this type of relationship before. Both line items tables are related to the parent by the same field. Is this OK? I want to make sure I don't create a mess for myself when I try to implement this with a user interface, etc.
    Thanks,
    John
    Yes, that sounds OK. Your transaction table has subtypes (cash transaction, credit transaction, ...) and each subtype has its own line items table.

  3. #3
    Join Date
    Jan 2003
    Posts
    6

    Smile Thanks for the input

    Thanks Tony

  4. #4
    Join Date
    Jan 2003
    Posts
    6

    Smile Thanks for the input

    Thanks Tony

Posting Permissions

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