


版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、SQL server database management and maintenanceSQL server database management and maintenanceTo connect SQL Server databaseFirst we introduce the basic knowledge of the database,be regarded as the warmup exercise that study database weave distance front!1.warmup exerciseNeeding first avowal is relati
2、on database that database knowledge that we here introduce all point。 The so-called relation database is to mean data as that the form gather, passing to establish simple form an a kind of database for of relation to defining construction.Iignorethewatchathowsavingwayinphysicsinthedocumentindatabase
3、it can see to make an a line for with row, with electronics form is similar with the Inrelationthelinewerecalledtherecordbuttherowtheniscalled wordsegment。This form inside each an all in formations for is a record, it including particular customer, but each record then included the same type with th
4、e word segment of the quantity:Customers number, name etc 。Form is logic set that a kind of related information that press a line ofarranging with row, similar in single form in work.Each row of the word a database form inside calls a word segment. Watch is from every kind of word a definition of it
5、s containment of, each word a data for describing its implying。 While creating to set up a database , the beard assign for each word segment a the piece belongs to the sex with the other according to the type,biggest length。The word segment can include every kind of word sign, arithmetic figure even
6、 sketch.An information of relevant customer deposits in the line of the form, is called record。By any largearbitrarily two records for database form to create set up cant be same.Key be a certain word or several words segment) of the form forfastinspectbutdriveThekeycanbeuniqueandalsocanthenthe righ
7、t and wrong is unique, being decided by it() whether admission repetition. Unique key can specify for main key , using each one that come to unique marking form。The norm turns the database design of mission be method that the data of buildup,but the data of buildup, should can dissolve otiose repeti
8、tion, and for have the necessary information offering to check to seek the path quickly 。 For attaining this kind of target but separate information to the process gone to in every kind of independent form, be called the norm turn.It is complicated process to use many appointed rules to proceed the
9、norm with the type of the different Class that norm turn. That process studies and discuss already beyond the reach of textual scope 。But,the norm of the simple database in majority turn and can use the simple experience in underneath rule completes: include the form of the information of repetition
10、 must be divided into independent a few forms dissolve repetition。If we have chosen to learn 12 curricular 1000 students, the each curricularelucidation will show with the teacher 100 many- to choose that curricular and eachstudent repeat once 。 To avoid this kind of low efficiency, should to turn t
11、he dichotomous and independent form in form to the norm,an is used to mean the student,the another uses mean the course.Now the form was turned by the norm, so, to changes the particular and curricularcoursedescribeordata,aslongaschangearecordallright 。Isabasic knowledge concerning database above,th
12、is is what study database plait distance must.Although the database technique is used as a course,its depth is not this space and can describe with the wide degree of,be used as the primer with simple database plaitthedistanceshouldbeallrightalready.Like,underneathwecanstart practicing.We usually me
13、et the database system is to registers the system ,ignoring you are in the attend what buildup,the register is to cans not help of,and it of the construction is more simple,we take a register system as an 。 The analysis is once a data forinvolving.2 。 understanding the elementsre,tenelfneplace、age、d
14、ate of birth、unit、address、postal service codestelephone、FAX. Certainly,can create to set up a form in brief ,make above each piece according to item to should a word segment.Need to point the form the main key in parties now, in order to unique marking each a record,increase register number conduct
15、and actions unique key respectively in register form,guarantee a two records like this all different.To the database after making an above analysis ,we can start establishing the database.set up the firm incampHere we study to establish the database how ,needing to make sure the type that to establi
16、sh the database first.Pass in Visual Basic the data interview control piece or data interview object ( DAO) can visit the following database:The database of JET, namely MicrosoftAccessThe database of such as: DBase, etc. ofFoxProThe database of follow the standard of ODBC customer/server database 。
17、Such as: Microsoft SQL ServerOracleBy any if develop the personal small scaled database system, use Access database comparison accommodation, todevelop thebigandmedium-sized database system uses the database of ODBC 。 But dBase with the database of FoxProbecauseofalreadyspecialnotuseotherwise。In our
18、 example, chose to use the database of Access certainly. Establish the database of Access contain two kinds of methods: While establishing the database in Microsoft Access 。 Click new set up button can establish the new form. Here we main introduction the second method: The usage can see to turn the
19、 data management machine, do not need to weave the distance and then can create to set up the database.Can see to turn the data management machine is the applied procedure of a great is a VB business enterprise version is supplementary with theprofessioninthecatalogue.DevastationvbsamplestheVisdata
20、is next, its interfaceisasfollowsthediagramClickthemenu”documentitemisnext” new set up son item” Microsoft ACCESS son item of edition 7.0 MDB” item. Input the new setting up the name of the database in flick window way open register, appear the underneath show the window way :Want the born and new f
21、orm, the single shot in right key database window way flicks the menu open, then the choice new form” ordinaries,establishing in watch construction dialog box appeared later on a word for wanting segment 。 The every time faces to join in the form new word segment, single shot increment word segment”
22、 button, will appear of” increment word segment dialog box.Increment word a type foroptionsinthe dialogbox,accordingtowordInourtheregisterdatabasethatestablish, the type of the each word segment.Want to notice of is, because the word segment registers the number be used unique marking record of, the
23、refore, it cant be inputted by customer. So while defining the words segment need to be defined for Long data type, the ” automatic born word segment item is valid ,and picks out thisitem。Bethecustomerlikethistoinputtorecordwithotherthedifferentvalue every input a new system would on the words segme
24、nt 。In ACCESS database, the key word realizes with the index of, conduct and actions plait distance personnel at gather to weave the distance to the record of the form to adjust to use index.While technique of Rushmore usestheindexinformationtheexcellentturningthesearchautomatically。Aftercompleting
25、the form definition, click” increment index button, flick such aspen figure 5 show the window way.In window way the right side contain three optioned, its meaningsuch as the index dialog box options.After completingsuchasfigure6Certainlytheacademicassociationdatabaseestablishes too not a dynasty the
26、 business of the one night, the reader no harm much practices once.Visit databases design and the development of the application procedures of MS Visual Basics of the databases of the SQL Server 。 When design a system, the customer still needs to comprehend to use to come to visit the plait distance
27、 of ask the data of SQL Server to connect. The origin was detailed to elaborate that the usage open typedatabaseconjunction(the Open Database Connectivity, ODBC) adjusts to connect the objects to connect with the class, still having the data interviews object (the Data Access Objects , the DAO) and
28、the long range data objects.Design and weave to write large and complicated and applied procedures database design for the software developer is a need to choose to weave the distance language and tools , do an accommodation for the SQL Server, choose the calculate way and the data structures , stil
29、l need to design the sketch customer interface and the application procedures to connect. The decision within the most important software design is applied fixed position of the procedure. In otherdesign must specify the system of which parts are data, business rule, and the data entrance procedure
30、and used for circulating the code of other part 。 The MS Visual Basic supports the plait distance that some databases manage the systems connect, especially SQL Server. Adjust to connect to include the ODBC and DB-Libraries to connect the, object to connect to include the data interview object (DAO)
31、 longrange data object (the RDO), the OLE DB and the ActiveX Data Objects (ADO)with the class, the SQL that returns the capable SQL Server to manage the mission distributestomanagetheobject(theSQLDistributedmanagementObjects, SQL-DMO) to connect 。 Connect the oculars right choice can improve the who
32、le function of system and the development speed biggest 。 Design the large data warehousesystem needstochoosetheappliedmodelproperly 。 Traditional customer/ services model depends on to join in the center layer but get the improvement to become three layer models. These three layers divide the line
33、system as three parts: each layer is responsible for providing theservice:(1) Data service( the Data Service) contain the maintenance data and theoperationdatesuchastheincrementmodificationdeletionandbackupsThese services maintenance data relation and contact , support backup and Usuallythedataservi
34、ceismanagedthesystemusagebythe database.(2) business service( the Business Service) is handled the logic by the businessruleanddatatoconstitute,suchasthedatalegitimacyrule,thebusiness processing support and the record backup logics. The main purpose of these services provides the data maintenance to
35、ward the application procedureLogic.(3)expressionthe Presentation or the customer service) supportcustomer interface, control the customer data to input to express with data。(Output)Noticeincustomer/servicestechnicalterm,sometimesexpress eenasserd ,eaerr (rafter,tesesnerer (middle layer) 。 But impor
36、tant comprehend any two layers 。 The data service business service expresses the logic support GUI that the service maintenance database business rule and the processing data need, data importation and manifestation thecorrespondences canthinktocarryonbetweencustomers machineandservers。Forexample,in
37、thecenterthelayercanthinkisa。Server The physics realization of the system can carry on through manydifferentpaths.The underneath wills discuss three layer logic models three kinds of to carry out the method:1.Fat customer machine realizationMany layer (the multi tier) realizations of fat customer th
38、e machine realization three layer models of a kind of carry out the options is in the customers on board movement business and expression services. This probably writes the most common path in the Visual Basic application procedure for the SQL Server. This kind of carries out the physics up only two
39、 layers:The server provides the data service only, this kind of method contain 2:00 shortageFirstwas the applied procedure to compute the on board increment at the customer, customers calculators need to be stronger, this will increase the system expensebecause the system usually takes several custo
40、mersWhen the system takes to have the number with thousand million of customers machine, this kind of method will become too expensive. Another 1:00 shortage is a possible increment maintenance expenses Move to the change of legitimacy logic and thebusiness rule of the system and will cause upgrade
41、customers machine procedure eachtime。Ifthesystemcontaincustomersmachineofthe equalquantity,thisisa problem. The biggest advantage of the machine realization in fat customer is to reduce the network discharge, if the legitimacy and the business rules need not be decidebythedatabase。Underthiskindofcir
42、cumstance,onlypassthedataofthe legitimacy logic and can spread toward server 。 Be the example of the importation data legitimacy,suppose the reader to have a small form (for example nationalform of name) to put in customers machine. If the data entrance mold piece checks the native watch but is not
43、a more national name inmaindatabase, then will reduce the network discharge obviously 。 Another an important use is in the development process of the 。 If the head developer was limited to the interview carry behind, for example, cant pass the data in the database to verify to input the legitimacy,s
44、o, this kind of method can make it right processing 。2 。 Thin customer machine realizationIn thin customer the machine realization, business the service locates the server, the business logic usually expresses for saving process.The Server, the saving process usages T-The SQL plait write. This kind
45、of realization is like fat customers machine to carry out the similar physics up only two layers.Theadvantageofthiskindofmethodistoreducethesystemexpensebecause thin customers machine needs the less system resources, this have very important manysystemsofcustomersmachinestoAndsupporttheexpensestoals
46、o compare the fat customer the machine system is a little less, because the code carries the concentrated control in the server 。 If the business rule is depend on in the data of the database, thin customer the machine realization reduces the network discharge 。 The main shortage of this kind of met
47、hod is a saving process to lack the vivid. The Visual Basic provide stronger than the T-SQL the plait distance ability that have to have another. Notice three the thin customer of the layer model the machine physics realization sometimes is called the fat server (the fat Server) model to confusewith
48、thincustomersmachine/servercalculationmodelbyavoidthelatter points a kind of thin customer the machine hardware equipments and techniques are for example theCitric.3. Many layer realizationMostinbriefmanylayerrealizationsarethreelayermanypossible three a kinds of the layer model physics realizations
49、. In this kind of realization, Link the SQL Server usage data service business to serve the ” thin” customer of the machine expression service data service business service of fat customer from the Visual Basic the machine expression service data business the service be an alone the progress circula
50、te. That progress can install for serve in the data same set server of theplaceoratanotheroneserverofthedissimilarity。Thekeycharacteristicsofthis kindof realization is the data service, business to serve the different from expression serve to can do for separation of progress movement in calculator.
51、 Three layerrealizations.連接 SQL Server 數(shù)據(jù)庫我們先介紹一下數(shù)據(jù)庫的基本知識(shí),算是學(xué)習(xí)數(shù)據(jù)庫編程前的熱身運(yùn)動(dòng)吧!1。 熱身運(yùn)動(dòng).所謂關(guān)一種數(shù)據(jù)庫。表 是一種按行與列排列的相關(guān)信息的邏輯組,類似于工作單表.字段 ,據(jù)類型、最大長(zhǎng)度和其它屬性。字段可包含各種字符、數(shù)字甚至圖形.記錄 各個(gè)客戶有關(guān)的信息存放在表的行,被稱為記錄。一般來說,數(shù)據(jù)庫表創(chuàng)建時(shí)任意兩個(gè)記錄都不能相同。鍵 就是表中的某個(gè)字段,或多個(gè)字段,它們?yōu)榭焖贆z索而被索引。鍵可以是唯一的,也可以是非唯一的,取決于它們是否允許重復(fù)。唯一鍵可以指定為主鍵,用來唯一標(biāo)識(shí)表的每行。例如,在前面的例子中,客戶標(biāo)
52、識(shí)號(hào)()表的主鍵,因?yàn)榭蛻籼?hào)唯一地標(biāo)識(shí)了一個(gè)客戶。關(guān)系 數(shù)據(jù)庫可以由多個(gè)表組成,表與表之間可以以不同的方式相互關(guān)聯(lián). ,分離到各種獨(dú)立的表中去的過程,叫做規(guī)范化。:包含重復(fù)信息的表必須分成獨(dú)立的幾個(gè)表來消除重復(fù)。如1000 100 多次 ,一個(gè)用來表示學(xué)生,一個(gè)用來表示課程?,F(xiàn)在表被規(guī)范化,.的結(jié)構(gòu)比較簡(jiǎn)單,我們就以一個(gè)登記系統(tǒng)為例吧.分析一下該系統(tǒng)所涉及到的數(shù)據(jù)。2。磨刀不誤砍柴功地址、郵政編碼、電話、傳真當(dāng)然,可以簡(jiǎn)單地創(chuàng)建一個(gè)表,使得上述的每個(gè)數(shù)建營(yíng)扎寨在這里我們學(xué)習(xí)怎樣建立數(shù)據(jù)庫,首先需要確定要建立數(shù)據(jù)庫的類型.VisualBasic 中通過數(shù)據(jù)訪問控件或數(shù)據(jù)訪問對(duì)象(DAO)可以訪問
53、下列數(shù)據(jù)庫SQL server database management and maintenanceSQL server database management and maintenanceJET 數(shù)據(jù)庫,MicrosoftAccessISAM 數(shù)據(jù)庫,如dBaseFoxPro等ODBCODBC標(biāo)準(zhǔn)的客戶/:Microsoft SQLServer、Oracle一般來說,如果要開發(fā)個(gè)人的小型數(shù)據(jù)庫系統(tǒng),用Access 數(shù)據(jù)庫比較合適,要開發(fā)大中型的數(shù)據(jù)庫系統(tǒng)用ODBC 數(shù)據(jù)庫更為適宜而dBase 和FoxPro數(shù)據(jù)庫由于已經(jīng)過時(shí),除非特別的情況,否則不要使用.在我們的例子中,當(dāng)然選用Access 數(shù)據(jù)庫了。建立Access數(shù)據(jù)庫有兩種方法:一是在MicrosoftAccess 中建立數(shù)據(jù)庫。點(diǎn)擊“新建”按鈕就可以建立新的表了。這里我們主要介紹第
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年中國(guó)PET電熱膜數(shù)據(jù)監(jiān)測(cè)研究報(bào)告
- 2025年中國(guó)IDE轉(zhuǎn)接頭數(shù)據(jù)監(jiān)測(cè)報(bào)告
- 2025年中國(guó)5-氯茚滿酮數(shù)據(jù)監(jiān)測(cè)報(bào)告
- 2025至2030年中國(guó)高效變頻非真空管市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)鎂合金焊接車架市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)西米替丁片市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)膠絲布葉市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)電視顯微鏡市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)牛仔皮牌市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 2025至2030年中國(guó)澆注型壓克力磨砂燈飾板市場(chǎng)分析及競(jìng)爭(zhēng)策略研究報(bào)告
- 細(xì)集料篩分自動(dòng)計(jì)算表格
- 15ZJ001 建筑構(gòu)造用料做法
- 年產(chǎn)5萬噸趣味酥性餅干生產(chǎn)車間設(shè)計(jì)
- RFJ013-2010 人民防空工程防化設(shè)計(jì)規(guī)范
- 柳州某醫(yī)院空氣源熱泵熱水系統(tǒng)設(shè)計(jì)案例
- 西師大版六年級(jí)數(shù)學(xué)下冊(cè)第四單元 扇形統(tǒng)計(jì)圖 單元概述和課時(shí)安排
- 《中越傳統(tǒng)節(jié)日對(duì)比問題研究5100字【論文】》
- 《 民航服務(wù)心理學(xué)》考試題及參考答案
- 2021學(xué)堂在線網(wǎng)課《生活英語讀寫》課后作業(yè)單元考核答案
- 中國(guó)近現(xiàn)代史綱要超星爾雅答案貴州大學(xué)-
- Q∕GDW 12162-2021 隔離開關(guān)分合閘位置雙確認(rèn)系統(tǒng)技術(shù)規(guī)范
評(píng)論
0/150
提交評(píng)論