Alpha Video Training
Results 1 to 5 of 5

Thread: Database design advice

  1. #1
    Member
    Real Name
    Mark Williams
    Join Date
    Dec 2005
    Posts
    322

    Default Database design advice

    We have an existing database that we have been using for years and has become the backbone of our business.

    When the database was developed, all company information (name, address ,telephone, etc etc) was manually included in every report, letter, etc.

    The powers to be now want all this information to be editable via a 'company information' form. This form needs to allow them to change all company information and any other fields used throughout the database that have default values (past due messages, invoice notes, etc).

    My initial thought was to create a 'company info' table with a field for every value they want to be able to edit. This would also require linking this table to every other table in the database via a set. All existing reports and letters would have to be recreated referencing the new set. This seems like way too much work and too much overhead on system resources.

    My other thought is to create a 'company information' form and set an 'onsave' event that sets all of the editable fields to a global variable. I could set these variables globally on startup and change the values when a field is changed on the company information form. All reports and letters would have to be edited referencing the new variables but at least new sets would not have to be created.

    Am I overlooking anything in my 'variable' option?


    Thanks for the help

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,311

    Default Re: Database design advice

    I prefer to use global variables initialized on startup.

    This article at www.learnalpha.com has been a big help.

  3. #3
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,644

    Default Re: Database design advice

    Quote Originally Posted by Mark Williams View Post
    This would also require linking this table to every other table in the database via a set. All existing reports and letters would have to be recreated referencing the new set. This seems like way too much work and too much overhead on system resources.

    Am I overlooking anything in my 'variable' option?
    1. A little additional work with the sets, but I don't see it as overwhelming. Sets are very efficient and you can copy the report/form to the new set and then the work to change is very similar to the work needed with global variables.

    2. If user 1 changes the table and his global variables, how does user 2 know that the table values have changed?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  4. #4
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,405

    Default Re: Database design advice

    Mark, with 20:20 hindsight, the Company Demographics Table is part of any application which is going to be sold to more than one user, so most developers would have included the table from which all data would be used on reports and letters etc.
    The good thing is you only have to do it once, and linking tables using sets is easy as Al mentions.
    If you plan carefully, you can set up one report based on the demographic data, copy the section and insert it into another report. It won't get rid of the work, but it will reduce it.
    I use this approach when developing user action buttons, and have a dummy form with all of the common theme items laid out as I want them to appear. If save fiddling later and looks consistent.
    Ted Giles
    Example Consulting - UK
    .

    http://ec12.example-software.com//
    See our site for Alpha Support, Conversion and Upgrade.

  5. #5
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    6,026

    Default Re: Database design advice

    I had to set this up many years ago and thanks to people like Tom Cone and others it has worked flawlessly.

    Company information table
    edited only by authorized persons
    read at app start up into global variables
    global variables are then used where ever needed throughout the app.

    This is used not only for the company info, but many of the company defaults like: tax rate, discounts, etc.
    Dave Mason
    dave@aldausa.com
    Skype is dave.mason46

Similar Threads

  1. Advice on DB Design for PO Numbers
    By cbbankz in forum Database Design
    Replies: 6
    Last Post: 11-11-2010, 05:02 PM
  2. Database Design Question - Pro's Advice NEEDED!
    By 2020rob in forum Database Design
    Replies: 4
    Last Post: 12-14-2008, 02:11 AM
  3. Database design - Form Design
    By Larpup in forum Alpha Five Version 8
    Replies: 2
    Last Post: 06-11-2007, 12:45 PM
  4. Weather Database Design Advice?
    By SWWeatherGuy in forum Database Design
    Replies: 1
    Last Post: 07-25-2006, 09:39 PM
  5. Backorder design advice needed
    By Pat Bremkamp in forum Alpha Five Version 5
    Replies: 4
    Last Post: 02-22-2004, 09:56 PM

Bookmarks

Posting Permissions

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