Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Database Design

Re: Database Design

From: dnagel <NOTgrandnagel_at_hotmail.com>
Date: Mon, 30 Dec 2002 15:41:43 -0800
Message-ID: <ebqy7zFsCHA.1848@TK2MSFTNGP09>


> 1. I proposed a design with one column in table for each checkbox in
> the screen. If a checkbox is selected "1" will be stored in the
> corresponding column else "0" will be stored. For the checkboxes with
> caption "Other" the text entered in the text box will be stored

Making a schema for just what you need today is a bad thing!

Design it so that you link out to another table to discern the information.

In the example below you would query the OptionType Table for a list of all the available options.

When the customer chooses the ones they want from your form, you write them back to the CustomerOptions Table.

I have included CustomerAddress so you get a feel for whats going on... basically you are trying to ensure that there is always a way to scale up the capabilities of your database without re-writing the schema.

While youre at it, build in the date created/updated (and by whom). That little step will save you thousands of dollars, many many hours... I just can't stress having an auditing capability enough!

Using a Lookup Table for 'magic numbers' and field translations is a wise idea as well... When taken to the extreme, you wind up with one table to translate if you ever go international,

Customer



CustomerID
Name
ActiveCustomerYN
DateCreated
DateUpdated
CreatedBy
UpdatedBy

CustomerOptions



CustomerOptionsID
CustomerID
OptionTypeID
OptionTypeValue
OptionTypeDescription
DateCreated
DateUpdated
CreatedBy
UpdatedBy

OptionType



OptionTypeID
OptionCaption
LookUpKey
LookupValue
OptionEnabledYN
DateCreated
DateUpdated
CreatedBy
UpdatedBy

CustomerAddress



CustomerAddressID
CustomerID
Address1
Address2
City
State
Zip
CurrentAddressYN
DateCreated
DateUpdated
CreatedBy
UpdatedBy

Lookup



LookUpID
LookUpKey
LookupValue
LookupText Received on Mon Dec 30 2002 - 17:41:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US