When using an interface like phpmyadmin/heidisql or others, I have this tables:
account
account_post
account_post_status
account_post_type
account_status
account_type
Ideal for me is this:
account
account_type
account_status
account_post
account_post_type
account_post_status
So I found that using numbers as prefix is just perfect. It does the job exactly as I want. I mean:
01_account
02_account_type
03_account_status
04_account_post
05_account_post_type
06_account_post_status
and so on
I read several subjects like mine, with users who want to prefix tables, but with obscure reasons. My reason is because I want to see them in an interface in a specific order. Tables listed above are just an example. I have a maximum of 40 tables in my database and order them using numbers is just fascinating.
I also read an sql naming convention for tables and I understand that prefixing table names with numbers is not a good practice at all. I found that some database systems doesn't even accept table names to be prefixed with numbers.
Anyway, for me, there is only one little disadvantage. The application itself. I am now using mysql with PHP. When i will use queries to select/insert/update etc from database, I should also use the prefix, which is quite annoying. But I will create a function to add the prefix from a known list (because I may want to change the order in the meantime). Example:
"SELECT id FROM ".add_table_prefix('account')." WHERE whatever"
I also have a convention for naming foreign keys, and these names includes the table names. I won't add the prefix there.
Also, I don't know if phpmyadmin or other GUIs for mysql have options to create a custom order for tables, but is not in my interest, as I want to have this order anywhere I access the database without other configurations.
I'm listening. How bad is what I'm doing ? There is one single guy here who have made this ?
Edit:
Be honest, in a database is more often to have a smaller number of columns in a table than tables in a database. In such conditions, give me a good reason why we would like to order columns (as we want, and we do) but we would not want to order the tables.
The only benefit of ordering columns in a table is for our view, right ? Why not doing this for tables too ? Just because the SQL language didn't implemented this (so GUIs), that doesn't mean it doesn't make sense to order tables, right ?
order_by
column and store the value in that - this has the benefit of being a bit more explicit and not coercing (using a column for something for which is was not intended).