MySQL metadata addon (very cool idea!) (brainstorm!)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Beowulf
Forum Newbie
Posts: 3
Joined: Mon Jul 15, 2002 4:32 pm

MySQL metadata addon (very cool idea!) (brainstorm!)

Post by Beowulf »

:idea: Ok, look, here's the idea...

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)?

:D Please, I really need your feedback!
gratou
Forum Newbie
Posts: 10
Joined: Sun Jul 28, 2002 4:27 am
Location: Auckland, NZ

Post by gratou »

You could store the input type in the metadata.
Text wil be the most common, but radio would be good too, especially for enum data.
Post Reply