Subject | Re: [firebird-support] Stored Procedure Name : 32 chars max in Firebird 2.x ? |
---|---|
Author | Martijn Tonies |
Post date | 2007-02-01T10:53:17Z |
Hi,
At a company I worked for, we didn't use SP_001 etc, but what we did
use for tables (Oracle has a similar limit of 30 chars for all object names)
was a 4 character code for each table that made somewhat sense, but
keep table names in full.
PERSON = PRSN (and keep those in a diagram next to the normal
table names)
All FKs would then be named FK_<4chars>_<4chars>_<something>
After a while, you "get" the names pretty quickly.
For SPs, you could do the same. eg: prefix something with the "group"
they belong to. For example:
SP_ORDR_CR / SP_ORDR_DEL
and so on.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I'm wondering whether the 32 characters limit on stored procedure names31 characters really, yes, it still exists.
> still exists in firebird 2.0...
>The fb2 release notes has nothing to sayNooo, you shouldn't, IMO. Makes development a pain.
> on the subject. This is not a big showstopper or anything, just that if
> you have tons of stored procedures, creating a meaningful name in
> 32chars is... um... painful :)
>
> At some point i was even thinking of creating a translation table to
> store 'short sp name' (ex: 'sp_0001', 'sp_0002', 'sp_0003', keep it
> under 32chars ) vs 'full/real sp name' (ex:
> 'sp_get_actual_payment_allocation_from_finance_department')
> and devise a way to translate/resolve the names somehow during sp calls.
> Probably not worth the effort, though... because of several drawbacks:Be creative :-)
> - no compile time syntax checking
> - slower since every sp call involves a table lookup
>
> Anyway, any other info/advice/tricks/workarounds are very much
> appreciated.
At a company I worked for, we didn't use SP_001 etc, but what we did
use for tables (Oracle has a similar limit of 30 chars for all object names)
was a 4 character code for each table that made somewhat sense, but
keep table names in full.
PERSON = PRSN (and keep those in a diagram next to the normal
table names)
All FKs would then be named FK_<4chars>_<4chars>_<something>
After a while, you "get" the names pretty quickly.
For SPs, you could do the same. eg: prefix something with the "group"
they belong to. For example:
SP_ORDR_CR / SP_ORDR_DEL
and so on.
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com