On 2015-12-24 6:21 PM, Stephen Chrzanowski wrote:
> One thing I would suggest, if you're looking to add and delete columns
> dynamically is not to worry about the order of the columns in the database,
> but, have a second table hanging around that remembers the specified order
> the user wants to see the columns in.  Doing your update and insert calls
> make no difference so long you specify the fields on either call (Or in
> oter words, don't do [ insert into MyTable values (1,2,3) ].  Be aware on
> tables that get large.  Adding or deleting fields can get expensive when
> the databases physical pages need to be updated, especially if the field
> you're adding affects, or has indexes modified.

It sounds like you're advocating a data dictionary of sorts, which I agree 
with. 
  The order for displaying columns in is meta-data that should be defined 
separately for the users' sake, while the actual columns have no significant 
order in the database.  Display order is also just one of many kinds of useful 
meta-data, and storing that separately allows you to have whatever kinds of 
meta 
you want without complicating the core system. -- Darren Duncan

Reply via email to