cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Terry Jeske" <terry.je...@gmail.com>
Subject Re: Lookup tables
Date Sat, 23 Dec 2006 17:05:46 GMT
Great! I will have to look into this after the first of the year.

Thanks for the response.

On 12/22/06, Michael Gentry <blacknext@gmail.com> wrote:
>
> This sounds like normal, standard, typical things one would want to
> do.  Cayenne supports in-memory sorting, but it sounds like you want
> to do refreshes from the database, which is fine.  Just add an
> ordering clause to your query each time.  See if this page helps you:
>
> http://cwiki.apache.org/CAYDOC/using-orderings.html
>
> /dev/mrg
>
>
> On 12/21/06, Terry Jeske <terry.jeske@gmail.com> wrote:
> > Thank you all for your input. Michael asked me "What exactly do you
> > need?".  Which is a good question:
> >
> >    - We need a way to track projects.
> >    - Projects will be displayed to the user in a grid, which should be
> >    sortable by Name, and Status.
> >    - Status values are: "Completed", "In Progress", "Not Started"
> >    - The current status values may change over time. For example "Not
> >    Started" may change to "TBD".
> >    - The user can change the status of a project by selecting a value
> >    from a HTML list box.
> >    - An admin user can add (and edit) values to the status table through
> >    a web form, and these changes are immediately available to the
> website -
> >    i.e. list box values are populated from the database. Adding a new
> >    Status requires no code changes, it is purely database driven.
> >
> > I know that this example is a bit contrived i.e. "status" would normally
> > stay a bit static. However, there are other cases where these values may
> > change, and having them in a Key table should not be a big deal (IMHO
> <g>).
> >
> > I should note that I am not a DBA, but I know enough to get by, usually
> by
> > running queries until I get the syntax right. My focus is on the
> integration
> > side of things, but like many of us, I have to wear many hats.
> >
> >
> > On 12/20/06, Juergen Saar <juergen@jsaar.org> wrote:
> > >
> > > I would it do in the Andrus-Style ...
> > >
> > > but it seems, as if the idea of terry is a freetext-status,
> > > that is continous changed during the lifecycle of a project.
> > > I wonder why this information is not placed directly in the
> project-table.
> > >
> > > 2006/12/21, Andrus Adamchik <andrus@objectstyle.org>:
> > > >
> > > > Terry,
> > > >
> > > > Just noticed that according to your message, status_table has an FK
> > > > to project... Wouldn't you want the opposite if a project has just
> > > > one status? (other than that what others and myself suggested in
> this
> > > > thread is still correct).
> > > >
> > > >
> > > > projects_table
> > > > --------------------------------
> > > > id int (pk)
> > > > projectname varchar
> > > > status_id int (fkey to status_table id)
> > > >
> > > >
> > > > status_table
> > > > ------------------------------
> > > > status_id int (pk)
> > > > status_name varchar
> > > >
> > > >
> > > > Andrus
> > > >
> > > >
> > > > On Dec 21, 2006, at 2:34 AM, Terry Jeske wrote:
> > > >
> > > > > projects_table
> > > > > --------------------------------
> > > > > id int
> > > > > projectname varchar
> > > > > status int
> > > > >
> > > > >
> > > > > status_table
> > > > > ------------------------------
> > > > > projectId int (fkey back to projects_table id)
> > > > > status_name varchar
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message