图书管理程序(一)
2001-03-30 16:34:24 来源:WEB开发网核心提示:本级程序所用的数据表结构: # # # 数据表的结构 'author' # CREATE TABLE author ( author_id int(6) DEFAULT '0' NOT NULL auto_increment, first_name varchar(20) bina
本级程序所用的数据表结构:
# --------------------------------------------------------
#
# 数据表的结构 'author'
#
CREATE TABLE author (
author_id int(6) DEFAULT '0' NOT NULL auto_increment,
first_name varchar(20) binary NOT NULL,
last_name varchar(20) NOT NULL,
address varchar(100) binary NOT NULL,
zipcode varchar(10) NOT NULL,
telephone varchar(10) NOT NULL,
email varchar(50) NOT NULL,
comment varchar(255) NOT NULL,
PRIMARY KEY (author_id),
KEY first_name (first_name),
KEY last_name (last_name),
KEY address (address),
KEY zipcode (zipcode),
KEY email (email)
);
# --------------------------------------------------------
#
# 数据表的结构 'books'
#
CREATE TABLE books (
books_id int(6) DEFAULT '0' NOT NULL auto_increment,
books_name varchar(100) binary NOT NULL,
publisher_id varchar(6) NOT NULL,
date_pub datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
type varchar(6) NOT NULL,
pages varchar(4) NOT NULL,
price float(6,2) DEFAULT '0.00' NOT NULL,
comment varchar(255) binary NOT NULL,
ISBN varchar(25) NOT NULL,
PRIMARY KEY (books_id),
KEY name (books_name),
KEY publisher (publisher_id),
KEY date_pub (date_pub),
KEY price (price),
KEY pages (pages),
KEY type (type),
KEY ISBN (ISBN)
);
# --------------------------------------------------------
#
# 数据表的结构 'books_author'
#
CREATE TABLE books_author (
id int(6) DEFAULT '0' NOT NULL auto_increment,
books_id varchar(6) NOT NULL,
author_id varchar(6) NOT NULL,
author_type varchar(6) NOT NULL,
PRIMARY KEY (id)
);
# --------------------------------------------------------
#
# 数据表的结构 'publisher'
#
CREATE TABLE publisher (
publisher_id int(6) DEFAULT '0' NOT NULL auto_increment,
publisher_name varchar(100) binary NOT NULL,
address varchar(100) NOT NULL,
zipcode varchar(10) NOT NULL,
telephone varchar(10) NOT NULL,
telefax varchar(10) NOT NULL,
email varchar(50) NOT NULL,
PRIMARY KEY (publisher_id),
KEY name (publisher_name),
KEY address (address),
KEY email (email)
);
# --------------------------------------------------------
#
# 数据表的结构 'author'
#
CREATE TABLE author (
author_id int(6) DEFAULT '0' NOT NULL auto_increment,
first_name varchar(20) binary NOT NULL,
last_name varchar(20) NOT NULL,
address varchar(100) binary NOT NULL,
zipcode varchar(10) NOT NULL,
telephone varchar(10) NOT NULL,
email varchar(50) NOT NULL,
comment varchar(255) NOT NULL,
PRIMARY KEY (author_id),
KEY first_name (first_name),
KEY last_name (last_name),
KEY address (address),
KEY zipcode (zipcode),
KEY email (email)
);
# --------------------------------------------------------
#
# 数据表的结构 'books'
#
CREATE TABLE books (
books_id int(6) DEFAULT '0' NOT NULL auto_increment,
books_name varchar(100) binary NOT NULL,
publisher_id varchar(6) NOT NULL,
date_pub datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
type varchar(6) NOT NULL,
pages varchar(4) NOT NULL,
price float(6,2) DEFAULT '0.00' NOT NULL,
comment varchar(255) binary NOT NULL,
ISBN varchar(25) NOT NULL,
PRIMARY KEY (books_id),
KEY name (books_name),
KEY publisher (publisher_id),
KEY date_pub (date_pub),
KEY price (price),
KEY pages (pages),
KEY type (type),
KEY ISBN (ISBN)
);
# --------------------------------------------------------
#
# 数据表的结构 'books_author'
#
CREATE TABLE books_author (
id int(6) DEFAULT '0' NOT NULL auto_increment,
books_id varchar(6) NOT NULL,
author_id varchar(6) NOT NULL,
author_type varchar(6) NOT NULL,
PRIMARY KEY (id)
);
# --------------------------------------------------------
#
# 数据表的结构 'publisher'
#
CREATE TABLE publisher (
publisher_id int(6) DEFAULT '0' NOT NULL auto_increment,
publisher_name varchar(100) binary NOT NULL,
address varchar(100) NOT NULL,
zipcode varchar(10) NOT NULL,
telephone varchar(10) NOT NULL,
telefax varchar(10) NOT NULL,
email varchar(50) NOT NULL,
PRIMARY KEY (publisher_id),
KEY name (publisher_name),
KEY address (address),
KEY email (email)
);
- ››程序员 不妨都写一写前端代码
- ››管理/var/spool/clientmqueue/下的大文件
- ››程序启动画面
- ››管理私有云,第 2 部分: 使用 WebSphere CloudBur...
- ››程序员面试问题锦集
- ››管理 Eclipse 环境:Eclipse 维护的神秘艺术
- ››程序员:使用 DB2 for z/OS 减少会话:第 1 部分:...
- ››管理私有云:WebSphere CloudBurst Appliance 命令...
- ››管理启动项 - Windows 7中的BCDEDIT命令
- ››管理Exchange 2003注意事项
- ››程序设计师的迷思---工具与数据库
- ››管理好超级管理员帐户堵住系统漏洞
更多精彩
赞助商链接