MySQL metadata addon (very cool idea!) (brainstorm!)
Posted: Mon Jul 15, 2002 4:32 pm
Suppose you have some database with lots of different tables and lots of links between them (1-N, N-N).
Suppose you want to do search, insert, replace very often.
Now, how do people usually do search? That's right - make a form take all its fields, validate them, and compose a query. Now that's perfectly fine if you have five fields. What if you have like 50? It sure looks like a programmer's hell to me.
That's where the metadata class comes into play! You describe all your fields, and, most importantly, relations between tables, and just say: "make a form with fields 1,2,5,6,12,15". After you hit submit this class looks for fields, validates them according to their description, and forms the query all automatically.
And then comes the display. It's really boring to make your SQL query results fall into a nicely formatted table. This thing is to do it automatically using a specified template!
I actually started to implement that thing an yes, it works! What I need is some user input. What kind of things would such a class need to do (in addition to those I mentioned)?