Pascal方法:將標識符的首字母和后面連接的每個單詞的首字母都大寫 ,可以對三字母或更多的字符的標識符使用。例如:BackColor
Camel方法:標識符的首字母小寫,而后面連接的單詞首字母都大寫。例如:backColor
CREATE DATABASE BMS
IF OBJECT_ID(N't_booktype',N'U') IS NOT NULL
DROP TABLE t_booktype
CREATE TABLE t_booktype(
typeno int primary key not null,
typename varchar(30) not null
)
IF OBJECT_ID(N't_books',N'U') IS NOT NULL
DROP TABLE t_books
CREATE TABLE t_books(
bookno int primary key not null,
bookname varchar(30) not null,
typeno int not null
)
IF OBJECT_ID(N't_readertype',N'U') IS NOT NULL
DROP TABLE t_readertype
CREATE TABLE t_readertype(
readertypeno int primary key not null,
readername varchar(30) not null,
lendnumber int not null
)
IF OBJECT_ID(N't_readerinfo',N'U') IS NOT NULL
DROP TABLE t_readerinfo
CREATE TABLE t_readerinfo(
readerno int primary key not null,
readername varchar(30) not null,
readeraddress varchar(30) not null,
readertypeno int not null
)
IF OBJECT_ID(N't_lendbook',N'U') IS NOT NULL
DROP TABLE t_lendbook
CREATE TABLE t_lendbook(
recordno int primary key not null,
readerno int not null,
bookno int not null,
lendtime datetime ,
returntime datetime
)
INSERT INTO t_booktype
VALUES('1005','懸疑類')
INSERT INTO t_books
VALUES('1025','盜墓筆記','1005')
INSERT INTO t_readertype
VALUES('0005','黃秋萍',20)
INSERT INTO t_readerinfo
VALUES('0005','黃秋萍','南昌市','0005')
INSERT INTO t_lendbook
VALUES('0005','0002','1013','2004-07-28','2004-11-16')
SELECT *
FROM t_books
UPDATE t_books
SET bookname='深入理解計算機系統'
WHERE bookno='1001'
UPDATE t_readertype
SET readername='吳嬌'
WHERE readertypeno='0001'
SELECT *
FROM t_readerinfo
--查詢圖書名字
SELECT bookname
FROM t_books
--查詢圖書類別
SELECT typename
FROM t_booktype
--查詢名字叫吳嬌的借書記錄
SELECT t_readerinfo.readername,t_lendbook.lendtime,t_lendbook.returntime
FROM t_readerinfo join t_lendbook on t_readerinfo.readerno=t_lendbook.readerno
WHERE t_readerinfo.readername='吳嬌'
到此這篇關于圖書管理系統的sqlserver數據庫設計示例的文章就介紹到這了,更多相關圖書管理系統 sqlserver數據庫設計內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!