acl/lib_acl_cpp/app/ndb/idx_server/mysql_idx.sql
zsxxsz cc05b877a2 first commit acl to github
first commit acl to github
2013-08-18 17:42:25 +08:00

22 lines
784 B
SQL

CREATE DATABASE `db_name`;
USE `db_name`;
CREATE TABLE `tbl_dat` (
`id_database` int(10) unsigned NOT NULL COMMENT '数据库名称ID',
`id_table` int(10) unsigned NOT NULL COMMENT '数据表名称ID',
`id_index` int(10) unsigned NOT NULL '数据索引名称ID',
`key` varchar(220) NOT NULL '索引字段值',
`id_dat`, bigint(20) unsigned NOT NULL COMMENT '存储唯一ID号',
PRIMARY KEY(`id_database`, `id_table`, `id_index`, `key`) USING BTREE,
KEY `Index_id_dat` (`id_dat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tbl_dat` (
`key` varchar(256) NOT NULL COMMENT '由 id_database-id_table-id_index-id:key 拼接而成',
`id_dat`, bigint(20) unsigned NOT NULL COMMENT '存储唯一ID号',
PRIMARY KEY(`key`) USING BTREE,
KEY `Index_id_dat` (`id_dat`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;