I've large amount of objects, each might have a variety of type of characteristics. many of the characteristics overlap, for instance, many objects possess the attribute "title". Since you will find many kind of objects, if there's a table built for every group of objects with same group of characteristics, it will require large amount of tables.
Presently I am utilizing a mysql, which is saved by doing this.
You will find a couple of tables such as this, different table have different kind of data. For instance, inside a Integer table, it only store integers
In order to store all type of object within the system which is still easy to do blocking and sorting based on the data from the characteristics. It make queries a little more complicated and that i don't believe it is efficient.
Is is just method of doing it in mysql or any other relational databases? Must I try to look for other database models with this problem?
EDIT Used to do some investigation, it appears things i require is a Document-oriented database using the energy of SQL.
I believe what for you to do is investigate the area known as "object relational mapping". It's a large area with lots of solutions. Some are utilized in frameworks, for example ""ActiveRecord utilized in Rails.
Your design is known as Object-Attribute-Value (OAV). It's one method to map objects to some relational database. It's generally very slow, but very flexible. In case your class definitions change constantly (or change dynamically) this might be your only choice.
You should use Object-Relational-Mapping (ORM). It's a different way to make objects to some relational database. It's considerably faster, and somewhat stiffer. In case your class definitions don't change very frequently (and do not change dynamically) this can be a far, much better choice.
One table can be done, and most likely more suitable. Possess a table column for every of characteristics from all the object types. Adding yet another column to point the 'object type'. You will get all of the objects of 1 type from the table having a simple query for rows having a particular object type title.
An alternative choice to utilizing an ORM (that is makes sense), would be to rather make use of the language's in-built serialization functionality (whether it has one, otherwise a library rather) to change the item right into a byte buffer, and store that inside a database, having a appropriate answer to look up. This works pretty much with key-value databases for example memcached.