Hi guys

I'm researching info to create a CMS.

About database storing fields ( object fields ) and values ( field values ), ie for the class and for the content.
I've seen only 2 approaches here:
  • simple/single value table
  • multi value table


Simple/single value table (ex: integer):
Code:
CREATE TABLE value_integer (
  id  INT,
  value INT,
  -- other needed columns for connecting with the content
)
Multi value table:
Code:
CREATE TABLE value (
  id  INT,
  bool1 TINYINT,
  bool2 TINYINT,
  bool3 TINYINT,
  integer1 INT,
  integer2 INT,
  integer3 INT,
  string1 VARCHAR( 2048 ),
  string2 VARCHAR( 2048 ),
  string3 VARCHAR( 2048 ),
  text TEXT,
  datetime DATETIME,
  -- other needed columns for connecting with the content
)
The second approach doesn't look the better since most of the columns will be empty.
However for the fields that need several values will need that the query has several tables and rows, instead of 1 simple table/row.

What are your opinions about this?