> about 2, deleting integrity. You can do: > db.define_table(...,Field('name','reference > blabla',ondelete='cascade'))
yes, you are true. I think, ON DELETE command keeps the integrity inside the backend database (web2py generates just one DELETE command). My idea was to keep the integrity at web2py level (generate separate DELETE commands /or UPDATE foreignkey=Null/ for all children), however this would be slow and not necessary if all supported databases support ON DELETE CASCADE and ON DELETE SET NULL. cascade is default. --- And what other possibilities are and their syntax? Same as in SQL, f.e. can/should I write ondelete='set null' ? Problem for me is, that with 'reference...' type foreign key cannot point to the table, which I will define later /at this time/. This means that more complex database models cannot be implemented. --- I know, I repeat this always, I apologize for this :-)