




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、學(xué)校代碼: xxx學(xué) 號:xxx (本科畢業(yè)外文文獻(xiàn)翻譯學(xué)生姓名:xxx 學(xué) 院:信息工程學(xué)院系 別:計算機(jī)系專 業(yè):軟件工程班 級:軟件06指導(dǎo)教師:xxx 講師 二一年六月to connect sql server databasefirst we introduce the basic knowledge of the database, be regarded as the warm-up exercise that study database weave distance front!1.warm-up exerciseneeding first avowal is relatio
2、n 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 todefining construction.i ignore the watch at how saving way in physics in the document
3、 in database is, it can see to make an a line for with row, with electronics form is similar with the row. in relation database, the line were called the record, but the row then is called word segment. this form inside each an all in formations for is a record, it including particular customer, but
4、 each record then included the same type with the word segment of the quantity: customers number, name etc.form is logic set that a kind of related information that press a line of arranging with row, similar in single form in work.each row of the word a database form inside calls a word segment. wa
5、tch is from every kind of word a definition of its 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 inclu
6、de every kind of word sign, arithmetic figure even sketch.an information of relevant customer deposits in the line of the form, is called record. by any large, arbitrarily two records for database form to create set up cant be same.key be a certain word segment( or several words segment) of the form
7、 inside, it() for fast inspect but drive index. the key can be unique, and also can then the right 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 miss
8、ion be method that the data of buildup, but the data of buildup, should can dissolve otiose repetition, and for have thenecessary 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 for
9、m, be called the norm turn.it is complicated process to use many appointed rules to proceed the 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
10、simple experience in underneath rule completes: include the form of the information of repetition must be divided into independent a few forms dissolve repetition.if we have chosen to learn 12 curricular 1000 students, the each curricular elucidation will show with the teacher 100 many- to choose th
11、at curricular and each student repeat once. to avoid this kind of low efficiency, should to turn the 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 curricular
12、 course describe or data, as long as change a record all right.is a basic knowledge concerning database above, this 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 pr
13、imer with simple database plait the distance should be all right already.like, underneath we can start practicing. we usually meet the database system is to registers the system, ignoring you are in the unit, or attend what buildup, the register is to cans not help of, and it of the construction is
14、more simple, we take a register system as an example. the analysis is once a data for involving.2. understanding the elementsfor the register, want the on the trail of information include:name 、sex、native place、age、date of birth、unit、address、postal service codes、telephone、fax.certainly, can create t
15、o 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 and actions unique key respectively in register form, guarantee a two records like
16、 this all different.to the database after making an above analysis, we can start establishing the database.3.set up the firm in camphere we study to establish the database how, needing to make sure the type that to establish the database first. pass in visual basic the data interview control piece o
17、r data interview object ( dao) can visit the following database:1)the database of jet, namely microsoft access2)the database of isam, such as: dbase, etc. of foxpro3)the database of odbc, every follow the standard of odbc customer/ server database. such as: microsoft sql server, oracleby any large,
18、if develop the personal small scaled database system, use access database comparison accommodation, to develop the big and medium-sized database system uses the database of odbc fester. but dbase with the database of foxpro because of already dated, unless special circumstance, do not use otherwise.
19、 in our 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 tu
20、rn the 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 use, it is a vb business enterprise version is supplementary with the profession version, in the catalogue. de
21、vastation vb samples the visdata is next, its interface is as follows the diagram.click the menu document item is next 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 sho
22、w the window way:want the born and new form, 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 segme
23、nt, single shot increment word segment button, will appear of increment word segment dialog box.increment word a type for options in the dialog box, according to word segment. in our the register database that establish, the type of the each word segment.want to notice of is, because the word segmen
24、t registers the number be used unique marking record of, therefore, 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 this item. be the customer like this to input to record with ot
25、her the different value every input a new record, system would on the words segment automatically.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 type, needs to adjust to use index. wh
26、ile searching, the technique of rushmore uses the index information the excellent turning the search automatically. after completing 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 meaning, such
27、 as table,12.increase the index dialog box options.after completing such as figure 6.certainly, the academic association database establishes too not a dynasty the business of the one night, the reader no harm much practices once.visit databases design and the development of the application procedur
28、es 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 of ask the data of sql server to connect. the origin was detailed to elaborate that the usage open type database conjunction (the open da
29、tabase 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 the long-range data objects. design and weave to write large and complicated and applied procedures database design for the software dev
30、eloper is a challenge, 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, still need to design the sketch customer interface and the application procedures to connect. the decision within the most importa
31、nt software design is applied fixed position of the procedure. in other words, design must specify the system of which parts are data, business rule, and the data entrance procedure and used for circulating the code of other part. the ms visual basic supports the plait distance that some databases m
32、anage 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), long range data object (the rdo), the ole db and the activex data objects (ado) with the class, the sql that returns
33、the capable sql server to manage the mission distributes to manage the object (the sql distributed management objects, sql-dmo) to connect. connect the oculars right choice can improve the whole function of system and the development speed biggest. design the large data warehouse system needs to cho
34、ose the applied model properly. 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 system as three parts: each layer is responsible for providing the service:(1) data service( the data s
35、ervice) contain the maintenance data and the operation date such as the increment, modification, deletion and backups. these services maintenance data relation and contact, support backup and instauration operation. usually the data service is managed the system usage by the database.(2) business se
36、rvice( the business service) is handled the logic by the business rule and data to constitute, such as the data legitimacy rule, the business processing support and the record backup logics. the main purpose of these services provides the data maintenance toward the application procedure logic.(3) e
37、xpression service( the presentation service)( or the customer service) support customer interface, control the customer data to input to express with data.(output) notice in customer/ services technical term, sometimes express the service definition as customers machine (or head), the data service d
38、efinition for server (or after carry), but the business service is in the center the layer (the middle layer). but important 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,
39、data importation and manifestation the correspondences can think to carry on between customers machine and servers. for example, in the center the layer can think is a head.server the physics realization of the system can carry on through many different paths. the underneath wills discuss three laye
40、r logic models three kinds of to carry out the method:1.fat customer machine realizationmany layer (the multi tier) realizations of fat customer the 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
41、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 layers:the server provides the data service only, this kind of method contain 2:00 shortage. first, was the applied procedure to compute the on board in
42、crement at the customer, customers calculators need to be stronger, this will increase the system expense, because the system usually takes several customers machines. when the system takes to have the number with thousand million of customers machine, this kind of method will become too expensive.
43、another 1:00 shortage is a possible increment maintenance expenses. move to the change of legitimacy logic and the business rule of the system and will cause upgrade customers machine procedure each time. if the system contain customers machine of the equal quantity, this is a problem. the biggest a
44、dvantage of the machine realization in fat customer is to reduce the network discharge, if the legitimacy and the business rules need not be decide by the database. under this kind of circumstance, only pass the data of the legitimacy logic and can spread toward server. be the example of the importa
45、tion data legitimacy, suppose the reader to have a small form (for example national form of name) to put in customers machine. if the data entrance mold piece checks the native watch but is not a more national name in main database, then will reduce the network discharge obviously. another an import
46、ant use is in the development process of the system. 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, so, this kind of method can make it right processing data.2. thin customer machine realizationin th
47、in 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 of realization is like fat customers machine to carry out the similar physics up only two layer
48、s.the advantage of this kind of method is to reduce the system expense, because thin customers machine needs the less system resources, this have very important many systems of customers machines to take. and, support the expenses to also compare the fat customer the machine system is a little less,
49、 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 method is a saving process to lack the vivid. the visual basic provid
50、e 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 confuse with thin customers machine/ server calculation model by avoid, the l
51、atter points a kind of thin customer the machine hardware equipments and techniques are for example the citric.3. many layer realizationmost in brief many layer realizations are three layer realizations, many possible three a kinds of the layer model physics realizations. in this kind of realization
52、, 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 circulate. that progress can install fo
53、r serve in the data same set server of the place or at another one server of the dissimilarity. the key characteristics of this kind of realization is the data service, business to serve the different from expression serve to can do for separation of progress movement in calculator. three layer real
54、izations.連接sql server數(shù)據(jù)庫我們先介紹一下數(shù)據(jù)庫的基本知識,算是學(xué)習(xí)數(shù)據(jù)庫編程前的熱身運(yùn)動吧!1. 熱身運(yùn)動首先需要聲明是,我們這里介紹的數(shù)據(jù)庫知識都是指的關(guān)系數(shù)據(jù)庫。所謂關(guān)系數(shù)據(jù)庫就是將數(shù)據(jù)表示為表的集合,通過建立簡單表之間的關(guān)系來定義結(jié)構(gòu)的一種數(shù)據(jù)庫。不管表在數(shù)據(jù)庫文件中的物理存儲方式如何,它都可以看作一組行和列,與電子表格的行和列類似。在關(guān)系數(shù)據(jù)庫中,行被稱為記錄,而列則被稱為字段。此表中每一行是一個記錄,它包含了特定客戶的所有信息,而每個記錄則包含了相同類型和數(shù)量的字段:客戶號、姓名等等。 表 是一種按行與列排列的相關(guān)信息的邏輯組,類似于工作單表。 字段 數(shù)據(jù)庫表中
55、的每一列稱作一個字段。表是由其包含的各種字段定義的,每個字段描述了它所含有的數(shù)據(jù)。創(chuàng)建一個數(shù)據(jù)庫時,須為每個字段分配一個數(shù)據(jù)類型、最大長度和其它屬性。字段可包含各種字符、數(shù)字甚至圖形。 記錄 各個客戶有關(guān)的信息存放在表的行,被稱為記錄。一般來說,數(shù)據(jù)庫表創(chuàng)建時任意兩個記錄都不能相同。 鍵 鍵就是表中的某個字段(或多個字段),它(們)為快速檢索而被索引。鍵可以是唯一的,也可以是非唯一的,取決于它(們)是否允許重復(fù)。唯一鍵可以指定為主鍵,用來唯一標(biāo)識表的每行。例如,在前面的例子中,客戶標(biāo)識號 (客戶號) 是表的主鍵,因為客戶號唯一地標(biāo)識了一個客戶。關(guān)系 數(shù)據(jù)庫可以由多個表組成,表與表之間可以以不同
56、的方式相互關(guān)聯(lián)。規(guī)范化數(shù)據(jù)庫設(shè)計者的任務(wù)就是組織數(shù)據(jù),而組織數(shù)據(jù)的方法,應(yīng)能消除不必要的重復(fù),并為所有必要信息提供快速查找路徑。為了達(dá)到這種目標(biāo)而把信息分離到各種獨(dú)立的表中去的過程,叫做規(guī)范化。規(guī)范化是用許多指定的規(guī)則和不同級別的范式來進(jìn)行規(guī)范的復(fù)雜過程。該過程的研討已超出了本文的范圍。但是,大多數(shù)簡單數(shù)據(jù)庫的規(guī)范化可以用下面簡單的經(jīng)驗規(guī)則來完成:包含重復(fù)信息的表必須分成獨(dú)立的幾個表來消除重復(fù)。如果有選學(xué)了十二門課程的 1000 名學(xué)生,每門課程的說明和教師將顯示100多次 對選了那門課程的每個學(xué)生都要重復(fù)一次。要避免這種低效率,應(yīng)當(dāng)把表分成兩個獨(dú)立的表來規(guī)范化,一個用來表示學(xué)生,另一個用來表
57、示課程?,F(xiàn)在表被規(guī)范化了,所以,要改變特定課程的課程描述或“數(shù)據(jù)”,只要改變一個記錄就可以了。以上是關(guān)于數(shù)據(jù)庫的基本知識,這是學(xué)習(xí)數(shù)據(jù)庫編程所必須的。雖然數(shù)據(jù)庫技術(shù)作為一門學(xué)科,其深度和廣度不是這點(diǎn)篇幅能描述的,但作為入門和簡單數(shù)據(jù)庫編程應(yīng)該是足夠了。好了,下面我們就可以開始練練了。我們經(jīng)常遇到數(shù)據(jù)庫系統(tǒng)是登記系統(tǒng),不管你是在單位,或是參加什么組織,登記是免不了的,而且它的結(jié)構(gòu)比較簡單,我們就以一個登記系統(tǒng)為例吧。分析一下該系統(tǒng)所涉及到的數(shù)據(jù)。2.磨刀不誤砍柴功對于登記,要跟蹤的信息包括:姓名、性別、籍貫、年齡、出生年月、單位、地址、郵政編碼、電話、傳真當(dāng)然,可以簡單地創(chuàng)建一個表,使得上述的每
58、個數(shù)據(jù)項對應(yīng)一個字段?,F(xiàn)在需要給表指派主鍵,用以唯一標(biāo)識每一條記錄,在登記表中分別添加登記號作為唯一鍵,這樣就保證數(shù)據(jù)庫中的任兩條記錄都不同了。對數(shù)據(jù)庫做出以上分析后,我們就可以開始建立數(shù)據(jù)庫了。3.建營扎寨在這里我們學(xué)習(xí)怎樣建立數(shù)據(jù)庫,首先需要確定要建立數(shù)據(jù)庫的類型。在visual basic中通過數(shù)據(jù)訪問控件或數(shù)據(jù)訪問對象(dao)可以訪問下列數(shù)據(jù)庫:1)jet數(shù)據(jù)庫,即microsoft access2)isam數(shù)據(jù)庫,如:dbase,foxpro等3)odbc數(shù)據(jù)庫,凡是遵循odbc標(biāo)準(zhǔn)的客戶/服務(wù)器數(shù)據(jù)庫。如:microsoft sql server、oracle一般來說,如果要開發(fā)個人的小型數(shù)據(jù)庫系統(tǒng),用access數(shù)據(jù)庫比較合適,要開發(fā)大、中型的數(shù)據(jù)庫系統(tǒng)用odbc數(shù)據(jù)庫更為適宜。而dbase和foxpro數(shù)據(jù)庫由于已經(jīng)過時,除非特別的情況,否則不要使用。在我們的例子中,當(dāng)然選用access數(shù)據(jù)庫了。建立access數(shù)據(jù)庫有兩種方法:一是在microsoft access中建立數(shù)據(jù)庫。點(diǎn)擊“新建”按鈕就可以建立新的表了。這里我們主要介紹第二種方法:使用可視化數(shù)據(jù)管理器,不需要編程就可創(chuàng)建數(shù)據(jù)庫??梢暬瘮?shù)據(jù)管理器是一個非常有用的應(yīng)用程序,它是vb企業(yè)版和專業(yè)版附帶的,在目錄.devstudiovbsamplesvisdata下。點(diǎn)
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 山東卷-2025屆高考物理4月模擬預(yù)測卷(含解析)
- 2025年廣東省深圳市南山區(qū)蛇口中學(xué)中考物理一模試卷(含解析)
- 宜賓市2024-2025學(xué)年初三語文試題周練試卷含解析
- 上海行健職業(yè)學(xué)院《計量文化傳播與設(shè)計》2023-2024學(xué)年第一學(xué)期期末試卷
- 湖南省二校聯(lián)考2025屆高三5月考前模擬化學(xué)試題含解析
- 遼陽市重點(diǎn)中學(xué)2025屆高三下第六次模擬考試生物試題含解析
- 西安思源學(xué)院《基地社工服務(wù)與田野基地建設(shè)》2023-2024學(xué)年第二學(xué)期期末試卷
- 汕頭市龍湖區(qū)2025年三下數(shù)學(xué)期末學(xué)業(yè)質(zhì)量監(jiān)測試題含解析
- 內(nèi)蒙古北重公司第三中學(xué)2025年高三下-第二次月考英語試題試卷含解析
- 四川南充市高2025年高三第三次聯(lián)考(江蘇版)語文試題試卷含解析
- 陜西2025年陜西機(jī)電職業(yè)技術(shù)學(xué)院招聘21人筆試歷年典型考點(diǎn)(頻考版試卷)附帶答案詳解
- 2024年浙江省《輔警招聘考試必刷500題》考試題庫必背附答案
- 2025年浙江溫州市工業(yè)投資集團(tuán)所屬溫州快鹿集團(tuán)公司招聘筆試參考題庫附帶答案詳解
- GB/T 21369-2024火力發(fā)電企業(yè)能源計量器具配備和管理要求
- 2025年陜煤集團(tuán)招聘筆試參考題庫含答案解析
- 國家級職業(yè)資格考試題庫管理辦法
- 2024-2030年中國審計服務(wù)行業(yè)競爭格局及投資模式分析報告
- 拍賣師資格考試題庫及答案(答案附后面)
- 城市軌道交通安全生產(chǎn)
- Spectrum-2010(根據(jù)規(guī)范生成設(shè)計反應(yīng)譜)
- 2024年長期照護(hù)師職業(yè)技能競賽理論考試題庫(含答案)
評論
0/150
提交評論