资源描述:
《银行atm存取款机系统数据库设计》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、银行ATM存取款机系统数据库设计execsp_configure'showadvancedoption',1goreconfiguregoexecsp_configure'xp_cmdshell',no_ouputgoreconfiguregoexecxp_cmdshell'mkdirG:SQL银行ATM存取款机系统数据库设计'goifexists(select*fromsysdatabaseswherename='ATMBankDataBase')dropdatabaseATMBankDataBasegocreatedatabaseATMBankData
2、Baseon(name='ATMBankDataBase_Data',filename='G:SQL银行ATM存取款机系统数据库设计ATMBankDataBase_Data.mdf',size=5mb,filegrowth=30%)logon(name='ATMBankDataBase_Log',filename='G:SQL银行ATM存取款机系统数据库设计ATMBankDataBase_Log.ldf',size=5mb,filegrowth=30%)go-------------------------创建数据表---------------
3、----------useATMBankDataBasegoifexists(select*fromsysobjectswherename='ATM_AccountInfo')droptableATM_AccountInfogocreatetableATM_AccountInfo(CarIDvarchar(20)notnull,PassWordchar(10)notnull,TypeIDintnotnull,DF_TypeIDintnotnull,OpenAccountDatedatetimenotnull,OpenAccountMoneydecimal(18,
4、2)notnullDropIDintnotnull)goselect*fromATM_AccountInfoifexists(select*fromsysobjectswherename='ATM_DealInfo')droptableATM_DealInfogocreatetableATM_DealInfo(CardIDvarchar(20)notnull,DealDatedatetimenotnull,DealMoneydecimal(18,2)notnull,DealTypeIDintnotnull,Copyvarchar(50)notnull)gosel
5、ect*fromATM_DealInfoifexists(select*fromsysobjectswherename='ATM_DepositFatchType')droptableATM_DepositFatchTypegocreatetableATM_DepositFatchType(DF_TypeIDintidentity(1,1)notnull,DF_Namevarchar(20)notnull)goselect*fromATM_DepositFatchTypeifexists(select*fromsysobjectswherename='ATM_A
6、ccountType')droptableAccountTypegocreatetableATM_AccountType(DropIDintidentity(1,1)notnull,CardStatevarchar(10)notnull)goselect*fromATM_AccountTypeifexists(select*fromsysobjectswherename='ATM_DealType')droptableATM_DealTypegocreatetableATM_DealType(DealTypeIDintidentity(1,1)notnull,D
7、ealNamevarchar(10)notnull)goselect*fromATM_DealTypeifexists(select*fromsysobjectswherename='ATM_CurrencyType')droptableATM_CurrencyTypegocreatetableATM_CurrencyType(TypeIDintidentity(1,1)notnull,TypeNamevarchar(10)notnull)goselect*fromATM_CurrencyTypeifexists(select*fromsysobjectswhe
8、rename='ATM_