Thread: Beginner Question: "Running Notes" or "Diary-like"
I have a very simple database with one table. Each row has columns identifying a client, client_contact, client_this, client_that, etc. This info. will remain mostly static, unchanged. But the most important part is adding the ability to attach time-stamped, prose language entries that correspond to each particular client. The best comparison I can think of is a doctor's "running notes" that relate the story of each client contact or office visit. Any guidance relating to postgres features to accomplish this is greatly appreciated. Thank you for your help. Mike
On Wed, Dec 02, 2009 at 06:12:47AM -0500, Mike wrote: > I have a very simple database with one table. > Each row has columns identifying a client, client_contact, > client_this, client_that, etc. > This info. will remain mostly static, unchanged. > But the most important part is adding the ability to attach > time-stamped, prose language entries that correspond to each > particular client. > The best comparison I can think of is a doctor's "running notes" that > relate the story of each client contact or office visit. Perhaps I'm misunderstanding your situation, but it sounds like you should just create a second table for your running notes. This table would contain a TEXT field for the note data, a TIMESTAMPTZ field for the timestamp, and a field or set of fields to match the primary key of your mostly static client table, to link each note with a particular client. -- Joshua Tolley / eggyknap End Point Corporation http://www.endpoint.com
Attachment
On Wed, Dec 2, 2009 at 7:02 AM, Joshua Tolley <eggyknap@gmail.com> wrote: > Perhaps I'm misunderstanding your situation, but it sounds like you should > just create a second table for your running notes. This table would contain a > TEXT field for the note data, a TIMESTAMPTZ field for the timestamp, and > a field or set of fields to match the primary key of your mostly static client > table, to link each note with a particular client. > Mr. Tolley, Thank you for the rapid response. I appreciate the suggestion; no misunderstanding on your part. :-) Looks like I need to do more reading, absorbing, and experimenting with primary keys and foreign keys. Thanks for your help. Mike