What about this (sounds silly, but works): put "TURBINE" not as prefix but as postfix. 
This way first 18 chars are much more likely to be unique. Makes sense?

Stephen Adkins wrote:
> 
> Hi,
> 
> >> - some db systems has restrictions on name-length of database-objects, e.g.
> >> Informix 18 chars (lowercase) on all objects (tables, columns, views, ...)
> >>
> >> So here a shorter prefix instead of Turbine would do better.
> 
> This is a great point worth considering.
> However, it may still work. (read below)
> 
> >Ugh.  -1 on supporting databases with arbitrary restrictions like this
> >(i.e. broken).
> 
> These databases are not broken.  They are that way because the SQL spec
> only calls for 18 characters.  Oracle only recognizes the first 18
> characters, although it allows you to provide additional characters.
> (Fortunately, all of the proposed names are unique within the
> first 18 characters.  i.e. TurbineUserPermission and TurbineUserPermission2
> would be interpreted by Oracle as the same table.)
> 
> I do not think it is reasonable to _not_ support databases which have
> a maximum number of 18 characters (i.e. Oracle).  However, I am not aware
> of any databases which have this restriction which limit you from supplying
> more characters (i.e. Oracle).
> 
> Maybe a poll would be in order from all people who know the different
> databases, to ensure that all of the main databases that you want to
> support can take a table name > 18 chars, even if it only looks at the
> first 18 chars.
> 
> In fact, I suggest that you make sure that all table names are unique in
> the first 14 characters.  This is because it is common to have other
> database objects (indexes, etc.) which need to be unique in the first
> 18 chars.  Thus, a table name like TurbineUserGroupRole would often be
> accompanied by a set of indexes named
> 
>    TurbineUserGroupRole_PK
>    TurbineUserGroupRole_AK1
>    TurbineUserGroupRole_IE2
> 
> These will not work in Oracle because they are not unique in the first
> 18 characters.  Rather, an autogenerating tool might truncate the table
> name to 14 characters in order to have room for the suffix like so.
> 
>    TurbineUserGro_PK
>    TurbineUserGro_AK1
>    TurbineUserGro_IE2
> 
> So, my recommendations are
> 
>   * ensure that all table names in Turbine are unique in the first 14 chars
>     (the proposed tables are)
>   * ensure that all generated database objects (does Torque do this) are
>     unique in the first 18 chars
>   * ensure that all of the desired databases allow you to supply more than
>     18 chars for a table name (I don't know of any that don't) even if they
>     only look at the first 18 chars to identify the table
> 
> Stephen
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]

-- 
Next generation of VB:
        Microsoft (r) Visual Basic = Microsoft (r) Visual Basic + 1


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to