4 ms·
> created on the fly (a crime for which any DBA would have you put to death, normally) Is the crime in creating tables on the fly? Or creating tables of ident
by mvc 14y ago
> created on the fly (a crime for which any DBA would have you put to death, normally)
Is the crime in creating tables on the fly? Or creating tables of identical structure on the fly?
- ars 14y agoBoth. Except the second one would be a crime even if not on the fly.
- fidz 14y agoI can't understand why this is a crime. Could you tell us (me) why it (creating new table on the fly) should be prohibited?
- zzzeek 14y agoA relational table is meant to store data, but is not meant to represent data by its own existence. "Represent data by its own existence" means, if you wrote an app where every time a user created a new account, a brand new table called "user_account_XYZ" would be created to store that user's account information. This is the classic "tables-on-the-fly" antipattern. It's not the same as a horizontal sharding or replicated system where tables are structurally broken out for scaling purposes. We of course have "on the fly" schemes for all kinds of things that are normally manually generated; some template languages automatically generate backing source files, cloud-based hosting spins up and tears down servers on demand, and database replication or sharding schemes will generate new schemas and tables to accommodate growth or change in the overall dataset. That's not what I mean when I say "on the fly" - I mean an application that relies upon creating new relational tables on the fly in order to represent data.