Thanks to everyone for all of their helo so far. I have been learning
so much!

I am in the process of rebuilding an application that I wrote years
ago, but this time using cake! So far it is looking very promising and
I think the whole thing will be so much cleaner! One thing a colleague
of mine suggested was that my database design might have been a little
strange. I'd like to briefly explain it and see what you all think.

This application is used to schedule the people who work at our
center. It is fairly complex (different types of workers, different
areas of work, and various shifts with multiple people on them. So, I
had two databases. scheduler_public and scheduler_staging. The staging
database was for the person doing the scheduling to log in and mess
around until it was right. Then they would publish the schedule (which
would copy the staging database to the public database). Public users
would never see the staging database.

Is it bad practice to have two databases for one application?

What I loved about it was that I had a multiple undo/redo function in
the staging area. It would simply do a mysqldump every time something
was changed (the database was not that large, maybe 14k) and call it
undo.1.sql, undo.2.sql etc. and then the user could easily cycle back
and forth between undos. It was very cool, but some might say that it
is crazy to do a mysqldump on every action! For me it was way better
than trying to write a reverse action for every action.

The other thing that was cool was that the public database was a
little different from the staging database in that every table had an
extra field which was a foreign key to an additional table called
schedule. This schedule table had the publish date and some other
info. So, I was able to keep a record of all of the published
schedules and they could be browsed through and searched and all sorts
of neat statistics could be calculated about the history of
scheduling.

So, now that I'm trying to do everything the cake way, does this seem
to be way off? Do you ever change what database you're using depending
upon the user? What do you think of that kind of design? What do you
think of my undo feature?

Thanks so much for your thoughts on this!
Jason

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to