Library management procedure (1)

Source: Internet
Author: User
Data table structure used by the program: # Tables # data table structure author # CREATETABLEauthor (author_idint (6) tables, first_namevarchar (20) binaryNOTNULL, last_namevarchar (20 data table structures used by the program:
#--------------------------------------------------------
#
# Structure of a data table 'autor'
#

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)
);

#--------------------------------------------------------
#
# Data table structure '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 '2017-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)
);
#--------------------------------------------------------
#
# Data table structure '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 Data table structure is "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)
);

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.