I’m looking for a method for storing JavaScript objects in a MySQL Style database.
I would like to have the database setup to handle objects, their attribues, and even object references.
Giving me the following grammar:
<object> := list of atributes
<attribute> := integer
| string
| boolean
| object-reference
| list of attributes
Is there a standart way, or best pratice, of doing this?
I would like to used the database layout to enable filtering based on atribute values.
The reason you are finding it difficult to store your object is because of Object Relational Impedance Mismatch
If you are stuck with a relational database then you will have to perform mapping between the object model and the relational model. If you are determined to store your objects in the way you describe then you will probably have to change to an Object Database
I have read Agile Database Techniques which covers this topic but I’m sure there are many others. There’s a lot of information out on the web too.