| Ylbtech-dbs:ylbtech-purplebill (Bill management System) |
-- =============================================
--Databasename:purplebill
--desc: Bill Management system
--Pubdate:15:20 2014-12-23
--Author:ylbtech
-- =============================================
| 1.A, Database diagram (db Diagram) back to top |
| 1.B, database design script back to top |
1.b.1,basic.sql
UseMasterGo-- =============================================--Databasename:purplebill--desc: Bill Management system--pubdate:15:20 2014-12-23--Author:ylbtech-- =============================================IF EXISTS(SELECT * fromMaster.. sysdatabasesWHEREName=N'Purplebill') DROP DATABASEPurplebillGOCREATE DATABASEPurplebillGO UsePurplebillGo-- =============================================--Ylb:1, sub-territorial "area"-- =============================================Create TableArea (AreaNamevarchar( $)Primary Key,--Zone nameUserpassvarchar( $),--PasswordDisablebit default(0)--status 0 = normal; 1 = disabled)Go-- =============================================--ylb:2, Bills table-- =============================================Create TableBill (Billnovarchar( $)Primary Key,--Invoice Numberpubdatevarchar( $),--Invoicing DateCompanyNamevarchar( $),--Unit nameAmountvarchar( $),--AmountProductNamevarchar( $),--Product NameAuthorvarchar( $),--The person who brought the ticketTypevarchar( $),--Now/TurnReturnpubdatevarchar( $),--Paragraph return dateAreaNamevarchar( $),--Zone nameAreaName2varchar( $),--Zone Name 2Annualvarchar( $),--yearRemarkvarchar( -),--NotesAuthorarrayvarchar( -),--List of ticket holders, separated by ', ' between multipleDisablebit default(0)--status 0 = normal; 1 = disabled)Go--drop table BillSelect * from AreaGoInsert intoArea (areaname,userpass,disable)Values('Beijing','123',0)View Code
1.b.2,
| 1.C, functional implementation code (function implementation codes) back to top |
|
Ylbtech Source: http://ylbtech.cnblogs.com/ This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility. |
Ylbtech-dbs:ylbtech-purplebill (Bill management System)