Re: [CDBI] Please fix CDBI::mysql
"Aaron Trevena" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 06/06, Karjala <[email protected]> wrote: > Is it possible to fix CDBI::mysql so as all field names in SQL > statements are surrounded by ` ` ? > > This would allow fields with names like "group" to exist in tables. Don't use database keywords in your schema! It's incredibly bad practice and liable to screw up sooner rather than later - I'm dealing with a schema containing keywords in Postgres and it's a PITA. The guy who designed it also denormalised and joins related tables on hand-entered text strings, or portions of them. This also sucks. Don't do that either. If you're going to use an ORM or any database for anything at all serious then you need to normalise it, ensure you aren't using confusing names or keywords and use numeric keys to avoid relying on user-entered data in joins. A.