create alias for columns bound to database?

2012-05-18 Thread D. Dante Lorenso
All, I'd like to be able to create column aliases which are bound to the database itself. I have an assortment of columns without naming standards which i'd like to migrate to a better naming scheme. Is there a feature in MySQL that would allow me to give a database column multiple names?

RE: create alias for columns bound to database?

2012-05-18 Thread David Lerer
Dante, consider using views that are defined with your alternate column names and present the application with these views rather than underlying table names. David. -Original Message- From: D. Dante Lorenso [mailto:da...@lorenso.com] Sent: Friday, May 18, 2012 5:22 PM To:

RE: create alias for columns bound to database?

2012-05-18 Thread Rick James
What's your advice on column naming conventions? I say * should not begin with the table name * ids should be spelled the same between tables (`foo_id` both where it is the PK, and where it is a FK) -Original Message- From: D. Dante Lorenso [mailto:da...@lorenso.com] Sent: Friday, May

SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-18 Thread Daevid Vincent
I have a table of DVDs, another of scenes and a last one of encoding formats/files... I want to find in one query all the dvd_id that have 0 scene_id that's encoded in format_id = 13. In other words all DVDs that are format_id = 13 despite not having a direct link. CREATE TABLE `dvds` (

RE: SQL query help. Retrieve all DVDs that have at least one scene of a certain encoding format

2012-05-18 Thread Daevid Vincent
-Original Message- Sent: Friday, May 18, 2012 5:34 PM I have a table of DVDs, another of scenes and a last one of encoding formats/files... I want to find in one query all the dvd_id that have 0 scene_id that's encoded in format_id = 13. In other words all DVDs that are