Hi Vineet

I'm sorry you didn't get a satisfactory answer, but I imagine there
are group members like myself who would love to contribute but don't
quite understand.  Let's see if I got this right...

You have a tricky form which might affect several different tables
depending on which fields are completed?  I see the data model,  but
what is the problem?

Are you having difficulty writing some tricky logic into a
controller?  If so,  what do you have so far and what is the issue?

Maybe we could see the form?

Best regards,
D

On May 15, 4:15 pm, Vineet <[email protected]> wrote:
> Simon,
> That is a good idea.
> In fact, almost the same approach is being followed in VFP cursor
> adaptor (the difference being that, data from MySQL tables is
> reproduced in same table structures, i.e cursors).
>
> Here, by virtual table, do you mean to say that we should reproduce
> the data into dictionaries by fetching a dict cursor from MySQLdb?
> (in DABO, they have an excellent concept of bizobj for this task).
>
> I am not asking for exact code, but can you suggest an approach to
> tackle the task?
>
> Dear Massimo & other friends,
> can you pl. suggest something to solve my problem?
>
> Thanks,
> Vineet.
>
> =================================================================
> On May 15, 5:07 pm, Simon Ashley <[email protected]> wrote:
>
> > Since no one has replied for a couple of days, I'll toss my 2 cents
> > in. Don't how much value this could be, as we just evaluating web2py
> > and python but in another environment we could have written data in
> > the normalised records to a temporary record in a denormalised,
> > virtualtable, update and saved this record, and then do selective
> > updates, insertions and deletions on each normalised record in the
> > original tables. Not that elegant but ...
>
> > On May 13, 9:17 pm, Vineet <[email protected]> wrote:
>
> > > pbreit,
> > > As you say, wherever possible or required, I have already denormalized
> > > thetable-structures.
> > > Apart from normalization / denormalization issue, in many other forms,
> > > I need to insert/update/delete records inmultipletables from one
> > > form.
> > > (as I mentioned earlier, there will be a mix of insert/update/delete
> > > of record(s) in different tables.)
>
> > > Massimo,
> > > If you too haven't understood what I intend to do with these 5 tables,
> > > I can elaborate the idea.
> > > Pl. tell me accordingly.
> > > The very success of developing my project using web2py hinges on this
> > > functionality.
>
> > > ---Vineet
> > > ================================================
>
> > > On May 11, 5:17 am, pbreit <[email protected]> wrote:
>
> > > > Normalizing is not always the best approach. If the database has not yet
> > > > been designed, perhaps reconsider. I still don't really understand what 
> > > > you
> > > > are trying to do but 5 small tables might not be necessary.
>
> > > > I would suggest getting some code working with 2 tables an then go from
> > > > there.
>
> > > > Some 
> > > > options:http://web2py.com/book/default/chapter/07#One-form-for-multiple-table...
>
> > > > Another approach would to use FORM or SQLFORM.factory and then coding 
> > > > the
> > > > database updates. You lose some of the Web2py features but it might 
> > > > still be
> > > > the easiest way to do it.
>
> > > > But my first suggestion would be to try and simplify what you are 
> > > > intending
> > > > to do.
>
>

Reply via email to