How exactly did you manage to get thier database?
Lucy only provides dumps of the spells "database." And all they're doing there is giving you the
spells_us.txt file as a DB.
As long as it's something that you aquired legally, then I'd love to get my pads. . . err HANDS on a copy!
As for the class thing. . .
In the items table, the class is actually determined by a bit being turned on. For example, a Paladin is (in binary) "00000100" or (in decimal) "4." All you have to do is check the corresponding bit. if it's a "1", then that class can wear it, if it's a "0" then they can't (if an item had "5" - "00000101" in binary - in the class field, then it would be wearable by both Pallys - class "00000100" or "4" - and Warriors - class "00000001" or "1".
As for slos. . .
I haven't looked into those too much yet so I can't help ya there. I would assume it's set up in a similar fashion though.