The structure of the data table used by this level program:
# --------------------------------------------------------
#
# The structure of the data table ' author '
#
CREATE TABLE Author (
author_id Int (6) DEFAULT ' 0 ' not NULL auto_increment,
first_name varchar () binary not NULL,
last_name varchar () not NULL,
Address varchar (+) binary not NULL,
ZipCode varchar (ten) is not NULL,
Telephone varchar (ten) is not NULL,
Email varchar (not NULL),
Comment varchar (255) is not NULL,
PRIMARY KEY (author_id),
KEY first_name (first_name),
KEY last_name (last_name),
KEY address,
KEY ZipCode (ZipCode),
KEY Email (email)
);
# --------------------------------------------------------
#
# The structure of the data table ' books '
#
CREATE TABLE Books (
books_id Int (6) DEFAULT ' 0 ' not NULL auto_increment,
Books_name varchar (+) binary not NULL,
publisher_id varchar (6) Not NULL,
date_pub datetime DEFAULT ' 0000-00-00 00:00:00 ' not NULL,
Type varchar (6) is not NULL,
Pages varchar (4) Not NULL,
Price Float (6,2) The DEFAULT ' 0.00 ' not NULL,
Comment varchar (255) binary not NULL,
ISBN varchar (+) not NULL,
PRIMARY KEY (books_id),
KEY name (Books_name),
KEY Publisher (publisher_id),
KEY date_pub (date_pub),
KEY Price,
KEY pages (pages),
KEY type (type),
KEY ISBN (ISBN)
);
# --------------------------------------------------------
#
# The structure of the data table ' 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)
);
# --------------------------------------------------------
#
# The structure of the data table ' publisher '
#
CREATE TABLE Publisher (
publisher_id Int (6) DEFAULT ' 0 ' not NULL auto_increment,
Publisher_name varchar (+) binary not NULL,
Address varchar (+) is not NULL,
ZipCode varchar (ten) is not NULL,
Telephone varchar (ten) is not NULL,
telefax varchar (ten) is not NULL,
Email varchar (not NULL),
PRIMARY KEY (publisher_id),
KEY name (Publisher_name),
KEY address,
KEY Email (email)
);
The above describes the book management system use case diagram of the book Management Program (a), including the book Management system use case diagram of the content, I hope that the PHP tutorial interested in a friend helpful.