[freeside] Freeside not SQL compliant?

Stephen Amadei amadei at dandy.net
Sat Oct 23 18:41:33 PDT 1999


On Thu, 21 Oct 1999, Ivan Kohler wrote:

I probably should move this to the devel list, but...

> > alot of the labels (column names, table names, index names) are over the
> > SQL limit of 18 characters
> 
> All column should be under <= 32 characters, unless you track radius
> attributes longer than 10 characters. 

Well, to get them under 18 characters (mostly a problem with indexes,
except the actual part_svc table), I have written a small translation
routine for DB2 or SQL datasources... and I am creating a new table for 
the actual Radius attribute names, instead of storing them in a column
name.
 
> That was actually a patch from the person who did the original PostgreSQL
> port - the column used to be named just `date' (even *more* of an SQL
> no-no).

My translation converts _date to ddate and _password to ppassword.
 
> I'd certainly like for Freeside use standard SQL exclusively, but I
> haven't yet done any work on this.

Well, DB2 is SQL compliant to a fault.  I'm sure my DB2 patches will be
at least SQL92 compliant.
 
> Depending on the radius attributes you decide to track with Freeside,
> column names can get really long (especially in the part_svc table), i.e. 
> 'svc_acct__radius_Attribute_Name_flag'

After my translation: 'sa__r_1_f'.  Then dig in the radius table for
attribute 1.  I know I loose alot of readability, but it seems to leave
most of the Freeside functionality intact.

> Good luck!  I'd certainly be interested in including these changes into
> the main package, and, time permitting, could help with some of the
> difficult bits.

Well, I'm still just starting... some parts have looked pretty bad, but
others are nice, quick changes... but I have run into a bit of a wall...

Is is really necessary to built an index for table 'cust_svc' on column
'svcnum', since an implicit index is created when you make 'svcnum' the
primary key (at least in DB2, I'm not sure if MySQL does this)?  In DB2, 
you cannot create an index if an identical index already exists.
I'm still trying to decipher the big %table thing in fs-setup... ;-)
 
 					----Steve
Stephen Amadei
Director of MIS
Dandy Connections, Inc.
Atlantic City, NJ




More information about the freeside-users mailing list