Results 1 to 4 of 4

Thread: DB Design for a software site.

  1. #1

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    DB Design for a software site.

    I'm working toward making a web site to sell some apps I've written.
    It will run VBScript with an Access DB.

    I'm trying to decide on a DB layout, how does this sound?
    Code:
    tblCustomer
        CustomerID 'auto numbered
        First Name
        Last Name
        Address    'Optional?
        Email      'Required
        
    tblPrograms
        ProgramID    'auto numbered
        ProgramName
        ProgramVersion
        FreeUpgradeFromVersionX
    
    tblOrders
        OrderID         'auto numbered
        CustomerID
        ProgramID
        ProgramVersion 
        Date            'Order placed 
        PayPalSaleID
        RegKey           'Users registartion key, could just use the OrderID?
        DownloadCode     'The ASP extention to create their download page
        DownloadAccessed 'Date-time when the download code is first used
    
    tblSupport
        OrderID 'or RegKey?
        SupportRequestEmailAddress 'the email address the customer used when asking for support
        Issue
        Action
        Result

  2. #2
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: DB Design for a software site.

    ProgramVersion is stored in the tblPrograms - it is redundant to store it again in the tblOrders.

    Do you need to relate prior versions of programs to each other? If so then add a PriorVersionProgramId to the tblPrograms.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  3. #3

    Thread Starter
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: DB Design for a software site.

    I was only going to have one row for each program in tblPrograms and list the Current Version in the ProgramVersion field.

    But you may have a point.
    If I make a new row for each update I could add a list of changes.
    That would make it easy to create an ASP page to show the customers the bug fixes and enhancements to the newest version.

    I've also added TicketID and Date fields to tblSupport.

    When would the PriorVersionProgramId field be useful?

  4. #4
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: DB Design for a software site.

    Quote Originally Posted by longwolf
    When would the PriorVersionProgramId field be useful?
    If the program name stays the same from version to version it would not be needed.

    Otherwise it was simply a way to point a particular version of the program back to the programid of the prior version. Would allow you to make a "list" of just a specific program with all the versions.

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

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