View Single Post
  #5  
Old April 6th, 2010, 02:11 AM posted to microsoft.public.access.tablesdbdesign
hollyylloh
external usenet poster
 
Posts: 18
Default Interested in thoughts on keeping the integrity of historical

Thank you, yes that makes sense. The address was just an example, but I think
with some close planning that is what I need to do. To continue the example,
there would be many possible addresses for the client and they would change
back and forth between each as needed, and the user would not be able to
delete an address.

"Steve" wrote:

If a client has multiple addresses over time, then there is a one-to-many
relationship between client and client address. When a one-to-many
relationship exists, you need a table on the many side. So you need:
TblClient
ClientID
ClientName
other client fields that don't change

TblClientAddress
ClientAddressID
ClientID
NewAddressStartingDate
address fields

When you need to retrieve a client's address, you find the current address
by looking for the address associated with the max NewAddressStartingDate.

Steve



"hollyylloh" wrote in message
...
Just to be clear, I am not looking for an explanation of how relational
databases work in this question, I have been creating relational databases
for many years, please read closer.

I have a database that needs to store information as it was originally
entered. So, for example, normally I would enter client information (name,
address etc) in one table, and specific transaction information in
another.
Reports would print out with the appropriate information for now. In the
future, let's say the clients address changes. When I go in and change the
clients address, I am actually changing it for historical purposed as
well,
unintentionally of course, and this is usually acceptable. If for example
I
need to keep the historical transaction intact as it was originally
entered
(with the now old address), I would need to inactivate the old client
information and create basically a new client to store the new address.
This
of course is difficult to get the user to do, they will just change the
old
address to the new address.

One way to go about this is to force the user to create a new client by
not
allowing edits or creating a routine that aids the user in the process.

Another way to go about this is to create what is really a flat file for
all
the information that needs to be historically accurate. The client table
thus
becomes more of an extended drop down menu for entering multiple values
into
the main historical table. I really think this is the better way to go
about
this. What do you think?

I am interested in additional thoughts on this, thank you in advance.



.