create table t_field ( field_id bigint auto_increment primary key not null, class_id integer not null references t_class(class_id), type_id tinyint not null references t_type(type_id), access_id tinyint not null references t_access(access_id), name varchar(64) not null, value text null, index (field_id), unique (field_id), index (class_id) );