外文翻译--Designing a Database Application in VB 6

时间:2022-03-04 14:21:00  热度:321°C

1、DesigningaDatabaseApplicationinVB6/0AbstractBeforeyoustarttodesignadatabase/itsimportantyouunderstandexactlywhatadatabaseisandwhattypesofdatabasesyouhavetochoosefrom/Theapplicationtypewillaffectthedatabasetypethatyouchoose/WhatIsaDatabase?Adatabaseisreallyasystemthatcontainsmanydifferentobjectsusedt

2、ogethertoallowyourapplicationfastandefficientaccesstothedata/Youcanusemanyexamplesofdatabaseswithyourapplication/Themostcommonoftheseareasfollows/MicrosoftAccess;MicrosoftFoxPro;OraclePersonalEdition7ior8i;andMSSQLServer7/00isonlyafewtomention/Allthesedatabasescanrunonastandalonecomputerandallowyout

3、ocreateverycomplexdatabasesforyourapplications/Pickingtherightdatabaseforyourapplicationisextremelyimportant/becausethewrongonewillaffectperformanceandmakeyourjobasadevelopersomuchmoredifficult/Beforestartingthedesignprocess/youneedtoselectadatabase/WhenworkingwithVisualBasic/thedatabasethatyoucanch

4、oosefromfallintotwodistinctgroups/LocalDatabasescanbeaccesseddirectlyfromVisualBasicthroughVisualBasicsdatabaseJetengine;andRemotedatabasescannotbeaccessedbyusingVisualBasicsstandarddatabaseaccesscapabilities/Understandingthedifferenceswillhelpyouselectthecorrectdatabaseforyourapplication/However/in

5、VisualBasic6/thereisnowawaytoaccessbothlocalandremotedatabasesusingthesamedatabaseaccesscontrolsandobjectsknownastheActiveXDataObjects/UnderstandingUniversalDataAccess(UDA)Asdatabaseshavegrownandmovedoffthelocalcomputerandontonetworkeddatabaseservers/themethodsemployedtoaccessthedatabaseshavechanged

6、/Microsofthasaddressedthesechangesbydevelopingstrategytoallowforanycompanyordatabasetobeaccessedthesameway/ThisiscalledUniversalDataAccess/orUDA/UnderstandingwhatUDAmeansisnotassimpleasunderstandingtouseit/ThereasonforthisisthatUDAisasetofrulesandaccessmethodsthatmustbefollowedbyanycompanythatiscrea

7、tingadatabaseaccessmethodtobeused/Thisallowsyou/theprogrammer/toaccessanydatabasethesamewayButwhatisUDA?UniversalDataAccessisaplatform/applicationsandtoolsconceptthatMicrosofthasdevelopedthatdefinesanddeliversthestandardsforallfutureapplicationdevelopment/UsingUDAstandardswillprovidehighperformancea

8、ccesstomanytypesofdataandinformationthatresideonmultipleplatforms/andaprogramminginterfacethatwillworkwithalmostanytoolorlanguageusingtheskillsthatdevelopersalreadyhave/ThisisaccomplishedbyusingMicrosoftsDataAccessComponents(MDAC)/aswellasanintegratedsetoftechnologies/whichincludeActiveXDataComponen

9、ts(ADO)/OLEDB/andOpenDatabaseConnectivity(ODBC)/Thebenefitsofusingthesestandardsincludethefollowing/HighperformanceaccesstodataProvidestheabilitytoscaleanyapplicationorcomponenttosupportconcurrentlyconnecteduserswithoutlosingperformance;ReliabilityReducesthenumberofcomponentstosupportontheclientPC;a

10、ndWideindustrysupportManyvendorsincludingMicrosofthavealreadyannouncedsupportfortheUDAstandards/InpreviousreleasesofVisualBasic/youneededtochoosefromeitherDAO(local)accessmethodstodataorRDO(remote)accesstodata/Now/withthesupportofUDA/VisualBasichasathirdmethodfordataaccesscalledADO/orActiveXDataObje

11、cts/Thisallowsyoutocombinethedifferentwaysofaccessingdataintoonesetofprogrammingcallsandobjects/ADOworksinconjunctionwithOLEDBandODBCtoprovideaccesstoonedatabaseyoumightbeworkingwith/Gettingforward/MicrosoftplanstophaseoutODBCinfavourofOLEDBandtheUDAstandards/However/forthenearfuture/DAOandRDO/aswel

12、lasODBC/willstillbesupportedtoallowdeveloperstoslowlymoveuptothenewstandardsofdataaccess/LocalDatabasesLocaldatabasesaregenerallymuchsmallerthantheremotetypeofdatabase/Thefollowingdatabasesfallintothiscategory/MicrosoftAccess;MicrosoftFoxPro;LotusWorksheets;MicrosoftExcelWorksheets;dBase;Paradox;and

13、ASCII/Asyoucansee/thesePC-residentdatabasetypeshavebeenaroundforawhileandareavailablefromalmostanycomputersoftwarestore/AccessingthesedatabasesdoesntrequireanyothersoftwaretobeinstalledonthePC/nordoesitrequirespecialknowledgeonhowtoworkwiththem/However/thesizeoflocaldatabasesisrestricted/MicrosoftAc

14、cess97databasescantexceed1GB(gigabyte)/Localdatabasesaregenerallyusedforsingle-userapplicationssuchascheckbooks/addressbooks/andpersonalinformationmanagers/Someenterprisingteenagershavecreateddatabaseapplicationsthathelpthemkeeptrackofbaseballcardsorvideotapes/Soindecidingwhatyourapplicationwilladdr

15、essandhowitwillbeusedactuallyhelpsyouinthedatabaseselectionprocess/RemoteDatabasesBydefinitionremotedatabasesdontresideontheusersPC/butthisisnotalwaystrue/Infact/aremotedatabaseisanytypeofdatabasethatrequiresanODBC(OpenDatabaseConnectivity)driverforanapplicationtoaccessit/ODBCdatabasesfallintotwomai

16、ncategories/onethatrunonasinglePCandthelargercorporateonesthatrequirelarge/verypowerfulcomputers(calledservers)withlargeamountsofavailablediskspace/DatabaseserversareusedtoseparatetheworkloadbetweentheclientPC(wheretheapplicationexecutes)andthedatabasesystem(wherethedatabasequeriesareperformed)/This

17、providestheapplicationwithfastdataaccesswithoutslowingdowntheusersPC/Mostthelargeserver-typedatabasesprovideversionsthatwillrunonstandalonePCs/Mostlargecorporationsuseoneofthefollowingdatabasesystems(thoughthisisnottosaythatothersarentoutthere)/Oracle;Sybase;andMicrosoftSQLServer/Usingaremotedatabas

18、erequiresyoutouseeithertheremotedatabaseobjectsavailableonlyintheEnterpriseversionofVisualBasic6orthenewActiveXDataObjectsavailableinallreleasesofVisualBasic6/Ifyouredesigninganapplicationthatwilluseoneoftheselargedatabases/however/thebestwaytocreatetheapplicationthatwillusethesingle-PCversionduring

19、thedesign/developmentandtestingprocess/Then/wewhentheapplicationiscompleted/switchtoODBCconnectiontothelarger/server-basedversion/BuildingtheInitialDesignCreatinganapplicationisalotlikebuildingahouse/Forawell-builthouse/youneedablueprinttofollow/buttocreateagoodblueprint/youneedtoknowwhosgoingtolive

20、inthehouseandwhattheirlivingstyleswillbe/Thiswillhelpyoudecidethenumberandsizesofthebedrooms/whatcolourstouse/andsoon/Withanapplication/theblueprintisthetechnicalspecifications;thefunctionalspecificationsarewhatyouneedtoknowtocreatethetechnicalspecifications/Now/manybooksteachtheoverallapplicationde

21、signprocessbyusingverysimplisticexampleapplications/Thedescriptionoftheapplicationwemustdevelopisasfollows/PersonalAddress/PhoneBookThisapplicationwillkeeptrackofnames/addresses/andphonenumbersbyname/Itwillallowasmanydifferentaddressesandphonenumbersasneeded/Also/itwillallowtheentryofsomepersonalinf

22、ormation(suchasbirthdate/spousesname/andchildrennames)tobedeterminedlater/Itwillalsoprovidereportsinseveralformatsandallowuserstosearchthedatabaseforaparticularperson/ChoosingtheTasksDefiningtasksfortheapplicationalsodefinesitscomplexity/Forexample/thisapplicationisanaddress/phonebook/ifyoudecidetog

23、iveuserstheabilitytoselectaphonenumberandhavethecomputerdialitforthem/Toaddthisfunctionalitytotheapplication/youneedtoknowhowtotestfortheexistenceofthemodem/connecttothatmodem/andthenactuallydialthatnumber/Ifyoudontknowhowtoaddthisfunctionality/youmightconsiderwaitingtoadditaftertheinitialversionoft

24、heapplicationiscreatedandtested/Thisiswhatreleasingnewversionsareallabout/Keeptheinitialversionofthisapplicationatasimplerlevel/Thebestwaytodesignanapplicationistosaytoyourself/“WhatwouldIwanttheapplicationtodoifIweretheuser?”Basically/yourethefirstandmostimportantuseroftheapplication/Thisapproachmi

25、ghtnotworkforthelarger/corporate-typeapplication/butitdoesworkforthesmaller/morepersonaltypes/Evenbeforeyoulistthedifferenttasksthattheapplicationwillperform/youneedtodecidewhattypeofapplicationinterfacetouseforthisapplication/Forthissampleapplication/usetheExplorer-styleinterface/Toreviewthisstyle/

26、theinitialformthatusersseeandremaininformostoftheapplicationwillresembletheoneshowninFigure1/Figure1-Thisinterfaceincludesmanyofthecontrolsthatyouhavelearnedearlier/Okay/wehavepickedtheapplicationthatyoullcreatenowyouneedtolistthemainfunctionsthatitwillperform/Thinkofwhattheapplicationisforandthenli

27、stwhatyouwantittodo/Fromthisreasoning/youshouldgetthefollowinglist/Keepnamesandaddresses;Searchforaparticularname;Printdifferenttypesofreports;Allowfordifferentusers;andEnableeasymaintenanceoftheapplication/Now/ifthislistseemssimplistic/itis!Youwouldthenexpandeachiteminthislistuntilyouresatisfiedwit

28、htheresult/Letsexpandeachoftheprecedingtasksandaddamoredetailtothedefinition/KeepingNamesandAddressesWhatdoyoureallymeanwhenyousay“Keepnamesandaddresses?”Itusuallymeansthatyouwanttokeeptrackofthestandardinformationfoundinanystandardtelephonebookyoulookat/Thefirststepindefiningallthemini-tasksrequire

29、dforthistopicistolistthedataelementsyouwanttoputinthedatabase/Table1liststhedataelementsthatyoucanuseforthistypeofapplication/NameTypeFirstNameStringLastNameStringSpouseNameStringChildNameStringAddressStringCityStringStateStringZIPIntegerE-MailAddressStringPhoneLongBirthDateDateNotesStringTable1/DataElementsThatCanBeIncludedInTheApplicationDatabase/

免责声明:
1. 《外文翻译--Designing a Database Application in VB 6》内容来源于互联网,版权归原著者或相关公司所有。
2. 若《86561825文库网》收录的文本内容侵犯了您的权益或隐私,请立即通知我们删除。