I would suggest trying to keep architecture simple with a one-to-one correspondence between
Architecture classes and the class attributes and DB Tables and the DB table's columns
This will come in handy when and if you want to look at ORM tools to persist the class attributes
to DB tables and columns via Hibernate or IBatis
here is a great example which details a Table called Honey and a class called Honey which will persist class contents to the PostGRES DB by utilising the methods available from InitSessionFactory
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> From: firstname.lastname@example.org
> Subject: Re: [GENERAL] Stroring html form settings
> Date: Fri, 26 Sep 2008 09:23:21 -0700
> To: email@example.com
> First, I want to thank you for your help. You have made great points
> and I just want to respond to some of your questions.
> > My first thought is that if you use a combined "info" field, you'll
> > lose the ability to easily do any kind of meaningful data analysis
> > based on which boxes are checked. If you just want to record what a
> > given user said at a certain time, but don't need it for any other,
> > more interesting evaluation of the data, then why bother with a
> > database?
> You are right that I don't really need to do any evaluation of the
> data, I just need to be able to get the default values of a form
> every time the user logs on. Each user may have their own default
> value for a form, and each form will have different components. A
> database was the first (may be not the best?) thing I thought of.
> Would you have other suggestions of how I should store them?
> > If it were me, I would probably store the form values in the database
> > fields, so that the table's columns matched the various data inputs in
> > the form.
> If the structure of each report did not differ this would work great
> but unfortunately it does.
> Thank you again.
> Sent via pgsql-general mailing list (firstname.lastname@example.org)
> To make changes to your subscription:
Get more out of the Web. Learn 10 hidden secrets of Windows Live. Learn Now