- milestone: --> V1.1
I propose a better column naming scheme.
Eash table should have a defined abreviation. Each column name should be prefixed by that abreviation. The exception is foreign keys, they should be named the same as the corresponding primary key.
The advantages are Joins can be done with NATUAL INNER JOIN instead of
INNER JOIN ON foo=bar.
Another advantage is, we won't have to remember that batch.subtype=beer_subtypes.id, they'll both be bst_id (batch.bst_id and beer_subtypes.bst_id).
Also with defined abreviations, we will not have to worry about two columns having the same name interfearing with NATUAL joins. For example; if two tables have a column called note, a natural inner join will join where the notes are equal as well as any foreign/primary key.
This change will be simpler to implement when as many queries as possible are moved out of user acccessable scripts and into functions_db.php.
A sample table:
Batch
id->b_id
recipe_id->r_id
start->b_start
complete->b_complete
notes->b_notes
rack_date->b_rack_date
born_on->b_born_on
batch_name->b_name
og->b_og
fg->b_fg
brewers_comments->b_comments
brewers_name->u_name
type->bt_id
sub_type->bst_id
active->b_active
size->b_size
Kevin