Database design of Library Management system

Source: Internet
Author: User
Tags administrator password

Database design of Library Management system
--Student table CREATE TABLE stu_info (--School number stu_num varchar() primary key  ,--name stu_name varchar() not  null,--College stu_college varchar( A),--grade Stu_grade smallint,--dormitory stu_dorm varchar(ten)); --Staff table CREATE TABLE teacher_info (--Employee number tea_num varchar( primary ) key ,--Worker's name tea_name varchar(a  ) not null,--Staff InstituteTea_college varchar ());--Book tablecreate  TABLE  Book_info (--Book Number book_num varchar  (20 ) primary  key ,--book name Book_name varchar  (30 ) not  null ,--Book Classification Book_cla varchar  (20 ),-- Book publishing house Book_pre varchar  (30 ),--Total number of books Book_all_ Quan int  default  0 ,--number of Book_quan int  default  0 ,--Publishing Time Book_time datetime); --Student loan information Form CREATE TABLE br_stu_info (--Library card lib_card bigint,--Book number book_num varchar,- -Borrowing time Bro_time datetime,--return period rn_deadline datetime,--return time rn_time datetime,primary key (Lib_card, Book_num),foreign key (lib_card) references log_stu_info (lib_card),foreign Key (Book_num) references book_info (book_num));--Employee loan and information Form CREATE TABLE br_tea_info (--Library card lib_card bigint,--Book number book_num varchar,- -Borrowing time Bro_time datetime,--return period rn_deadline datetime,--return time rn_time datetime,primary key (Lib_card, Book_num),foreign key (lib_card) references log_tea_info (lib_card),foreign Key (Book_num) references book_info (book_num));--Administrator Information Sheet CREATE TABLE sym_man_info (--Administrator account sym_num varchar) primary  Key,--administrator name sym_name varchar() not  null,--Administrator password sym_pass varchar (ten)  not null default 123456);--Student Login Information Form CREATE TABLE log_stu_info (--Library card number Lib_card bigint primary key IDENTITY (1000000,1),--study number stu_num varchar() not  null,-- Password stu_pass varchar() not  null,foreign key (stu_ num) references stu_info (stu_num));--Employee Landing Information Form CREATE TABLE log_tea_info (--Library card number Lib_card bigint primary key IDENTITY (1999999,1),--employee number tea_num varchar() not  null,-- Password tea_pass varchar() not  null,foreign key (Tea_ num) references teacher_info (tea_num));

Database design of Library Management system

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.