Results 1 to 6 of 6

Thread: Confused! Table Design

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Location
    Inside my Computer ...
    Posts
    2

    Question Confused! Table Design

    I have a Table called CERTIFICATES:
    * CertificateID
    * StudentID
    * CertificateNumber
    * DateIssued

    THE PROBLEM:
    In some cases the customer may ask for another certificate because he lost the first one ... but the tricky part is that my client will issue a new certificate (not a copy) and he wants to know which certificate is being “duplicate”.

    EXAMPLE:

    * Fist Certificate:
    Certificate ID: 1
    StudentID: 100
    Certificate Number: AA123456
    Date Issued: 10/02/2004

    * New Certificate:
    Certificate ID: 20
    StudentID: 100
    Certificate Number: AA123499
    Date Issued: 11/02/2004
    Duplicate (Certificate ID): 1

    So … I would like to know which would be the best way to do this … any suggestions??


    Thanks in advance
    Last edited by kdlc; Nov 6th, 2004 at 03:29 PM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    You could add a DuplicateID column to the table, but then you need to know whether

    The original certificate's info is still valid, or if it will be deleted
    Whether from the info for Original Certificate will tell you that Certificate 20 is it's duplicate.

  3. #3
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263
    Where is your customer information in any of these tables? How do you know what customer has what certificate in the first place?

  4. #4

    Thread Starter
    New Member
    Join Date
    Apr 2004
    Location
    Inside my Computer ...
    Posts
    2

    to keep it simple ...

    I didn't put the whole thing, because i want to keep it simple just to explain the issue ... but, yes i have the customer information in another table.

  5. #5
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263
    So, I should assume that the customer and the student are one in the same - right?

    Here is something we do of a similar nature - dealing with REPLACEMENT CHECKS. These types of checks replace existing checks that were lost or destroyed - so they do not count as a new check issue - simply replacing the stock that the original check was issued on.

    CHECK FILE:
    CheckNum
    CheckDate
    PayeeId
    CheckSource (will be P for original PAID check, R for the replacement check)
    ReconDate
    Status (I for Issued, V for Voided, S for Stopped, R for Replaced)
    Replaced by (will be blank at first)

    When a check becomes replaced, we flag the original with a STATUS of R for REPLACED and fill in the REPLACED BY value with the check number that replaces this dead check. We create a brand new row in the CHECK FILE for the REPLACEMENT check. That new row gets "R" in the CHECK SOURCE so we know where it came from.

    We happen to have PAYROLL/VENDOR history files that refer to the CHECK NUMBER. We change all references in these files to the new "replacement" check number, since the old number is really a non-issue at this point.

  6. #6
    Fanatic Member
    Join Date
    Sep 2004
    Location
    Jakarta, Indonesia
    Posts
    818
    if ur Certificates table is just had a few field..then u may consider mendhak's..
    if u had a lot of field..then u should consider to save it at other table for CertificateID that being Duplicated..

    1st NF - a table should not contain repeating groups.
    2nd NF - any fields that do not depend fully on the primary key should be moved to another table.
    3rd NF - there should be no dependency between non key fields in same table.
    - E. Petroutsos -


    eRiCk

    A collection of "Laku-abis" Ebook, Permanent Residence

    Access Reserved Words, a Classic Form Bug, Access Limitation, Know run Process and the Lock they hold in, Logging User Activity in MSSQL,
    Kill Database Processes

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