2014-11-19 00:25:21 +08:00
|
|
|
|
CREATE DATABASE `db_name`;
|
|
|
|
|
USE `db_name`;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `tbl_dat` (
|
|
|
|
|
`id_database` int(10) unsigned NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
|
|
|
|
`id_table` int(10) unsigned NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD>ݱ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
|
|
|
|
`id_index` int(10) unsigned NOT NULL '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ID',
|
|
|
|
|
`key` varchar(220) NOT NULL '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֶ<EFBFBD>ֵ',
|
|
|
|
|
`id_dat`, bigint(20) unsigned NOT NULL COMMENT '<EFBFBD>洢ΨһID<EFBFBD><EFBFBD>',
|
|
|
|
|
PRIMARY KEY(`id_database`, `id_table`, `id_index`, `key`) USING BTREE,
|
|
|
|
|
KEY `Index_id_dat` (`id_dat`)
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
|
|
|
|
|
|
|
|
|
<EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
CREATE TABLE `tbl_dat` (
|
|
|
|
|
`key` varchar(256) NOT NULL COMMENT '<EFBFBD><EFBFBD> id_database-id_table-id_index-id:key ƴ<>Ӷ<EFBFBD><D3B6><EFBFBD>',
|
|
|
|
|
`id_dat`, bigint(20) unsigned NOT NULL COMMENT '<EFBFBD>洢ΨһID<EFBFBD><EFBFBD>',
|
|
|
|
|
PRIMARY KEY(`key`) USING BTREE,
|
|
|
|
|
KEY `Index_id_dat` (`id_dat`)
|
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|