[geeklog-devel] UDFs
Dwight Trumbower
dwight at trumbower.com
Sat Mar 1 23:46:20 EST 2003
This the first proposal for dynamic udfs in geeklog2. I have done something
similar in the past with other systems. This works better than having a set
number of udfs in a table. It is easier to retrieve the data because you
don't have to check all predefined fields You can do a simple SELECT * from
udfs where scope ="entryscreen", instead of SELECT udf1, udf2, udf3, udf4,
udf5 from fixedudfs, which you then would have to check which udfs where used.
Take a look the following an poke holes in it.
In order to make things flexible for udfs, it makes sense to have a table
with unlimited udfs. Here the goal is for flexibility and not readability.
Start with the basic table
Create Table udfs(
udfid
name - field name on ui
datatype - could have a lookup table but might need to
denormalize for performance
scope - Where it is used, could be global, screen name, form name,
etc.
udfvalue - stored data for the udf
You could store the potential values in another table if you wanted to
dynamically create a list.
i.e. attributes for a SELECT element
Create table udfattributes
udfid - links to the udf table
name - attribute name, used in list
If you want security at a field level, cross reference table would need to
be incorporated.
Create Table udfrights
udfid
groupid
Fire away.
Dwight
dwight at trumbower.com
More information about the geeklog-devel
mailing list