create table Tag
(
	id integer primary key autoincrement,
	name varchar(127) not null,
	description varchar(255),
    sces blob,                  -- The corresponding array of scenario id.
    date_created integer default (strftime('%s', 'now')) not null
);

create table Catagory
(
	id integer primary key autoincrement,
    parent_id integer,
	name varchar(127) not null,
	description varchar(255),
    date_created integer default (strftime('%s', 'now')) not null
);
create index catagory_pidx on Catagory (parent_id);

create table Scenario
(
    id integer primary key autoincrement,
    cid integer not null,
    sid varchar(32) not null,
    name varchar(127) not null,
    pic varchar(255),
    map_feature varchar(127),
    method varchar(255),
    standard varchar(255),
    others varchar(255),
    failure varchar(255),
    tags varchar(255),
    date_created integer default (strftime('%s', 'now')) not null
);
create index scenario_cidx on Scenario (cid);