资源描述:
《SQLServer数据库技术与应用课程报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、SQLServer数据库技术与应用课程报告-图书馆数据系统createdatabaseBookManageonprimary(name=,BookManage_data,,filename二D数据库数据存放数据文件BookManage_data.mdf,size=10mb,filegrowth=20%)logon(name='BookManage_log',filename='D:数据库数据存放事务Fl/忐文件BookManage_log.ldf,size=10mb,filegrowth=20%
2、)B心(local)(SQLServer10.50.1617-jianfeng-PCjianfeng)日Ca昭库q口票绽娠库s□数据库快照BJBookManage0C3数振库关票图田口表SC3视圏a□同义词s□可編程性®_
3、ServiceBrokerS□存储a□安全性useBookManagecreatetablecategory(cidchar(3)notnullprimarykey,cnamevarchar(20)notnull)JIANFENG-PC.Boolc..ge・dbo.categoryTE
4、ST.sql・(local)....ng-PCjianfeng列名数据类型允诈Null值adcha「⑶cnamevarchar(20)createtableuserType(tidchar(3)notnullprimarykey,tnamevarchar(lO),borrowDaystinyint)JIANFENG-PC.Book...ge-dbo.userTypeJIANFENG-PC.Book...ge-dbo.categc列名数据类型允许Null值$tidcha「⑶OtnameborrowDaysv
5、archar(lO)tinyintcreatetableusers(uidchar(8)notnullprimarykey,unamevarchar(lO),pwdvarchar(lO),sexchar(2),birthDaydatetime,telchar(ll),tidchar(3)foreignkeyreferencesuserType(tid))JIANFENG-PC.BookManage・dbo.usersTEST.sql・(local)....-PCjian列名数掳类型允许Null值►?uid
6、char(8)□unamevarchar(lO)pwdvarchar(lO)sexch前⑵birthDaydatetimetelchar(11)tidchar⑶createtablebook(ISBNchar(10)notnullprimarykey,searchlDvarchar(lO),cidchar(3)foreignkeyreferencescategory(cid),bnamevarchar(50),pubHousevarchar(30),authorvarchar(10),pricedecima
7、l(5,2),totalNumtinyint,NumCanBorrowtinyint)JIANFENG-PCBookManage-dbo.bookJIANFENG-PC.BookManage-dbc列名数据类型允诈Null值ISBNjchar(10)searchlDvardiar(lO)cidchar⑶bnamevarchar(50)pubHousevarchar(30)authorvarchar(lO)pricedecimal(5/2)totalNumtinyintNumCanBorrowtinyintc
8、reatetableborrow(bidintnotnullprimarykeyidentity(1,1),uidchar(8)foreignkeyreferencesusers(uid),ISBNchar(10)foreignkeyreferencesbook(ISBN),borrowTimedatetime,retumTimedatetime,isReturnchar(1))bidintnuidchar(8)ISBNchar(10)画borrowTimedatetimereturnTimedatetim
9、e画isReturnchar(l)insertintocategoryvaluesfcOr/文学类)insertintocategoryvalues('c02;‘计算机类')insertintocategoryvalues(fc037夕卜语类Jinsertintocategoryvalues(fc047数学类')insertintocategoryvalues('c05丁天文类')▼*saaasaA54321卜O