A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Database design help.



 
 
Thread Tools Display Modes
  #11  
Old November 13th, 2008, 02:10 PM posted to microsoft.public.access.tablesdbdesign
sue gray
external usenet poster
 
Posts: 54
Default Database design help.

Thanks for the reply. I will do some more reading. Thanks again.

"tina" wrote:

you need to read up on the principles of relational design. for more
information, see http://home.att.net/~california.db/tips.html#aTip1.

tblClients.ClientID 1:n tblClientNames.ClientID


the above is a "shorthand" way of describing the table relationships:
ClientID is the primary key of tblClients, and it is the "one" side of a
one-to-many relationship with its' matching foreign key field ClientID in
tblClientNames.

hth


"sue gray" wrote in message
...
Tina,

Thank you very much for your response. It has helped tremendous.

However,
I am still struggling. I know I should know this but I need an

explanation
of the foreign keys.

"ClientID (foreign key from tblClients)" and also

the 1:n in this line

tblClients.ClientID 1:n tblClientNames.ClientID

Thanks again

"tina" wrote:

as with any entity that requires historical data to be preserved, you

need a
child table. your description is sketchy, so i'll show "sample" tables,

and
let you apply the principles to your own design:

tblClients
ClientID (primary key)
other fields that describe a client AND don't change OR don't need a
history of changes

tblClientNames
NameID (primary key)
ClientID (foreign key from tblClients)
FirstName
LastName
DateEntered

tblClientNotes
NoteID (pk)
NameID (foreign key from tblClientNames)
Notes

relationships:
tblClients.ClientID 1:n tblClientNames.ClientID
tblClientNames.NameID 1:n tblClientNotes.NameID

you do *not* need to put the ClientID field in tblClientNotes, because

each
note is directly linked to a specific clientname, which in turn is

directly
linked to a specific client. for any given client, the newest (maximum)

date
in the related ClientNames records will signify the "current" client

name.

hth


"kids23bball" wrote in message
...
I am trying to make a db with client notes in it. My problem is I

need to
be
able to track the client name changes. For example: client comes in
today
name is john doe, a note (form completed) is done and saved, now 3

months
later client comes in and name is john smith. I need the first note

to
still
be saved as john doe and not changeable and make sure john doe and

john
smith
are same person, which I have done by clientid. I want to be able to

see
all
notes done by john doe and john smith. Sorry if this makes no sense.

I
know
what I want just having trouble explaining. Thanks for any help.






  #12  
Old November 13th, 2008, 03:07 PM posted to microsoft.public.access.tablesdbdesign
Keith Wilby
external usenet poster
 
Posts: 812
Default Database design help.

"Steve" wrote in message
m...

Wow, Dr Frankenstien meets MS Access.

  #13  
Old November 13th, 2008, 03:11 PM posted to microsoft.public.access.tablesdbdesign
tina
external usenet poster
 
Posts: 1,997
Default Database design help.

you're very welcome


"sue gray" wrote in message
...
Thanks for the reply. I will do some more reading. Thanks again.

"tina" wrote:

you need to read up on the principles of relational design. for more
information, see http://home.att.net/~california.db/tips.html#aTip1.

tblClients.ClientID 1:n tblClientNames.ClientID


the above is a "shorthand" way of describing the table relationships:
ClientID is the primary key of tblClients, and it is the "one" side of a
one-to-many relationship with its' matching foreign key field ClientID

in
tblClientNames.

hth


"sue gray" wrote in message
...
Tina,

Thank you very much for your response. It has helped tremendous.

However,
I am still struggling. I know I should know this but I need an

explanation
of the foreign keys.

"ClientID (foreign key from tblClients)" and also

the 1:n in this line

tblClients.ClientID 1:n tblClientNames.ClientID

Thanks again

"tina" wrote:

as with any entity that requires historical data to be preserved,

you
need a
child table. your description is sketchy, so i'll show "sample"

tables,
and
let you apply the principles to your own design:

tblClients
ClientID (primary key)
other fields that describe a client AND don't change OR don't need

a
history of changes

tblClientNames
NameID (primary key)
ClientID (foreign key from tblClients)
FirstName
LastName
DateEntered

tblClientNotes
NoteID (pk)
NameID (foreign key from tblClientNames)
Notes

relationships:
tblClients.ClientID 1:n tblClientNames.ClientID
tblClientNames.NameID 1:n tblClientNotes.NameID

you do *not* need to put the ClientID field in tblClientNotes,

because
each
note is directly linked to a specific clientname, which in turn is

directly
linked to a specific client. for any given client, the newest

(maximum)
date
in the related ClientNames records will signify the "current" client

name.

hth


"kids23bball" wrote in

message
...
I am trying to make a db with client notes in it. My problem is I

need to
be
able to track the client name changes. For example: client comes

in
today
name is john doe, a note (form completed) is done and saved, now 3

months
later client comes in and name is john smith. I need the first

note
to
still
be saved as john doe and not changeable and make sure john doe and

john
smith
are same person, which I have done by clientid. I want to be able

to
see
all
notes done by john doe and john smith. Sorry if this makes no

sense.
I
know
what I want just having trouble explaining. Thanks for any help.








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.