sql - Simulating variable column names in sqlite -


I want to store entries in a database (key => a group of value pairs), but different from key entry Is the entry

I thought about the values ​​of the key for each entry (2) for each entry with two tables (1), (2) and the values ​​of the specific key for each entry, where Entries share common id fields in both tables, but I'm not sure how to drag entries in the form of key => value pairs in SQL with this kind of configuration.

Is there any better way? If this is not possible in sqlite, is it possible in mysql? Thanks!

It looks like you're looking for

The options are different tables for different types of entities, or for every possible key, create a table with one column and set the price for the bodies that do not hold that key.

Look at the presentation where it covers the professionals and opposition of the EAV model and offers possible options. The related part starts with slide 16.


Comments