Ordering columns in database tables
When it comes to column order in DB tables, are there any standards or at least best practices? Here's a handmade convention that I follow: primary key (i.e. id ); unique columns (i.e. email , ssn ); foreign keys (i.e. article ); columns holding user generated data (i.e. first_name , last_name ); columns holding system generated data; non-boolean (i.e. password_hash ); boolean (i.e. deleted , verified ) timestamp columns (i.e. created_at ); These leave many questions unanswered, though, so I'd like to hear your thoughts. Patrick Karcher In short, you've stated the standard conventions well and