Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: object naming conventions
"Daniel Morgan" <damorgan_at_exxesolutions.com> wrote in message
news:3F01D6F4.A7E79DBC_at_exxesolutions.com...
>
> I find naming conventions meaningless for tables other than to separate
> them from views and materialized views. Where I get concerned is with
> constraint names as it is near meaningless to report a constraint
> violation of SYS_00.....
>
Agree completely. I hate system generated constraint names. Smacks of sheer
laziness, or ignorance.
It screws up schema compares too, with most tools.
To digress slightly, along the (very sensible IMHO) lines of trying to get
meaningful error messages from the database itself, rather than from some
'wrapper' layer, one particular feature has irritated me for years:
Database:
'Inserted value too large for column'
Paul (from the rooftops, in a voice to wake the dead): 'WHICH BLOODY
COLUMN?'
Regards,
Paul
P.S. To OP, by the way: This is purely personal preference but I like:
Meaningful non-prefixed singular names for tables and columns Meaningful non-prefixed plural names for views Meaningful non-prefixed names for functions ('TO_BASE(orig_curr, amount)',for example, makes the SQL read more easily)
Prefixes for most other objects; PK_, FK_, CK_ for constraints
SQ_ for sequences SP_ for stored procedures PG_ for packages - but I make exceptions for common ones like 'DEBUG' as in
(made up example)
when others then
debug.send('Error in PG_SOMETHING: '||v_ora_error||' in section '||v_section||' while processing Customer No. '||to_char(l_customer_id));
Regards,
Paul
Regards,
Paul
Received on Tue Jul 01 2003 - 14:59:17 CDT
![]() |
![]() |