Tag Info

New answers tagged

2

Referential integrity and other constraints should be managed by the database and not the application that uses it. In the case of default constraints, I would have the UI pass in NULL for those fields or simply do not specify them at all in the INSERT query. The database will then supply the default value. The benefit to this is that SQL is designed for ...


0

Doing both should be considered an option. There are instances where the logic is too complex and relies on data from so many other tables, that the database code is just a bad place to handle it. If the goal is to consistently put them in the same place(s), you may not want to violate this, so keep it all on the form. On the form, you can prepopulate ...


0

Preferably, you should construct your workflow so that new records are initialized in the GUI only and not from the database. That will ensure that front-end and back-end don't need to agree about the default values, because the DB defaults never become visible to the user. If you must process adding just like editing, i.e. the front-end is loaded with ...


1

All you need is one table, with a simple design. You need A field for the uid Possibly a field for a timestamp (you may need that, you may not, don't know your particular circumstances). A field in which you serialize the Screen object and all the Shapes it contains. That means just one write to save and one read to recover the Screen and its shapes. ...



Top 50 recent answers are included