【正文】
序的搜索界面。注意那一組選擇按鈕允許用戶根據(jù)特定的字段進(jìn)行搜索,同時(shí)空白處允許用戶輸入合法的關(guān)鍵詞 進(jìn)行搜索。這個(gè)界面提交了要查找的內(nèi)容,接著使用數(shù)據(jù)庫(kù)搜索引擎進(jìn)行實(shí)際查找。 圖 3 不同的答應(yīng)報(bào)表式樣 你想要從應(yīng)用程序得到報(bào)告的什么類型? 這份報(bào)表在此過(guò)程中是否正確,報(bào)告通常與更大的軟件相關(guān),例如支票簿,賬本等等。 這應(yīng)用程序?qū)橛脩籼峁┮粋€(gè)在數(shù)據(jù)庫(kù)輸入的目錄。但是這個(gè)目錄采用什么格式呢?一些人將想要打印一個(gè)名字和編號(hào)存放在他們的公文包或者錢包。其它人將想要一詳細(xì)打印整個(gè)數(shù)據(jù)庫(kù)信息裝訂成本。真正的對(duì)這種列表進(jìn)行復(fù)制的是后來(lái)的文章 Working with Crystal Reports. 。 但是你 必須允許用戶選擇他們想要的輸出格式。不同的應(yīng)用軟件中提供了不同的方法: 一部分是彈出一個(gè)對(duì)話框讓用戶選擇有用的報(bào)表內(nèi)容,用戶選擇其中一個(gè)信息按按鈕繼續(xù)查找。 還有一些應(yīng)用軟件提供給用戶的是一個(gè)選擇列表,用戶選擇所需要的數(shù)據(jù)項(xiàng)產(chǎn)生應(yīng)用程序的標(biāo)準(zhǔn)報(bào)表。這種方法可以讓用戶自行設(shè)計(jì)一些不同的標(biāo)準(zhǔn)報(bào)表,那樣用戶就可以根據(jù)自己需要修改得到不同的版本。 另一種方式是給報(bào)表添加查找能力。 報(bào)告精品選集想法的每類型完全依賴件報(bào)告的工具用來(lái)創(chuàng)造并且展示報(bào)告。 考慮到不同用戶 很多數(shù)據(jù)庫(kù)應(yīng)用軟件都支持復(fù)雜的數(shù)據(jù)庫(kù)復(fù)制操作。 這允許一個(gè)家庭中不止一個(gè)人使用應(yīng)用程序,然而有他們自己私人地址 /電話的數(shù)據(jù)庫(kù)。 第一次訪問(wèn)數(shù)據(jù)庫(kù)時(shí)你可以要求一口令來(lái)進(jìn)入數(shù)據(jù)庫(kù)。這類過(guò)程如圖 3 中所示通??梢詮闹饕獞?yīng)用菜單或者工具條中獲得。 當(dāng)然,這種功能同時(shí)有它的問(wèn)題和要求。其中最重要的是你要給這么軟件提供一個(gè)空的數(shù)據(jù)庫(kù)模板用做建立不同的數(shù)據(jù)庫(kù)資料。 軟件的簡(jiǎn)單維護(hù) 維護(hù)對(duì)于用戶來(lái)說(shuō)到底意味著什么呢?他們唯一感興趣的就是,在他們每次需要使用該軟件時(shí)它是否可以工作。嗯,一個(gè)好的設(shè)計(jì)和測(cè)試關(guān)系到這個(gè)問(wèn)題。但是如果某些事情在他們的計(jì)算機(jī)上出錯(cuò)怎么辦還有他 們丟失了數(shù)據(jù)庫(kù)文件,還是他們不小心刪除額文件? 如果這些不可想象的意外發(fā)生,你的軟件必須允許用戶創(chuàng)建數(shù)據(jù)庫(kù)文件的備份的文件,他們可以簡(jiǎn)單的從他們的備份文件中恢復(fù)數(shù)據(jù)。涉及到復(fù)雜的數(shù)據(jù)庫(kù),數(shù)據(jù)庫(kù)備份系統(tǒng)必須確認(rèn)它的數(shù)據(jù)庫(kù)已經(jīng)備份。 圖 3 確定限制 確定一個(gè)應(yīng)用程序的限制覆蓋了兩個(gè)不同區(qū)域的設(shè)計(jì)過(guò)程。 設(shè)計(jì)應(yīng)用程序時(shí),你或許將開發(fā)函數(shù)列表中的某一功能,你想要在應(yīng)用程序內(nèi)存在,但是不懂相關(guān)知識(shí)或者沒(méi)有時(shí)間添加。這類發(fā)行真的 取決于是否你正計(jì)劃出售應(yīng)用程序和什么時(shí)候做好進(jìn)入市場(chǎng)的準(zhǔn)備。 開發(fā)者掉入的最大的陷阱之一是 onemore feature 綜合癥。 你在家完成一項(xiàng)工程,坐著并且說(shuō), 那看起來(lái)很偉大,但是剛剛讓我改變一件事情了嗎 ? 如果你有,你已經(jīng)了解這個(gè)致命的陷阱。如果你堅(jiān)持改變 just one more thing 應(yīng)用程序?qū)⒂肋h(yuǎn)完成不了。 為了防止這類問(wèn)題的發(fā)生,確定適合你應(yīng)用程序功能 (函數(shù)和特征 )的目錄和繼續(xù)堅(jiān)持做到底。如果你發(fā)現(xiàn)某些功能在你的應(yīng)用程序中將很好,把它列入下一個(gè)列表,等升級(jí)時(shí)在開發(fā)。以 這種方法,你不會(huì)失去這個(gè)創(chuàng)意,它還將不影響應(yīng)用程序的最初版本。你發(fā)現(xiàn)是一定在應(yīng)用程序內(nèi),一點(diǎn)需要的功能,但是沒(méi)有存在, 無(wú)論什么將延長(zhǎng)其完成日期。 你在開發(fā)應(yīng)用程序確定的第 2 個(gè)限制是多少數(shù)據(jù)才太多,雖然你想要開發(fā)相當(dāng)靈活的程序,為用戶提供太多靈活性通常以誤差的形式產(chǎn)生不良后果并且丟失數(shù)據(jù)為代價(jià)的。想象什么將發(fā)生什么如果你允許用戶創(chuàng)造新電話號(hào)碼什么時(shí)候增加新的字段。這能導(dǎo)致一個(gè)表單把數(shù)百個(gè)電話號(hào)碼與它相關(guān)。用戶將怎樣容易展示這信息? 很多時(shí)間,這種限制出現(xiàn)在一個(gè)已經(jīng)存在數(shù)據(jù)的數(shù)據(jù)庫(kù)引擎的一個(gè)函數(shù)和它安全地 支持能多少數(shù)據(jù)。就 Microsoft Access 97 而論,數(shù)據(jù)庫(kù)文件不能超過(guò) 1GB(千兆字節(jié) )。 像地址本這樣的應(yīng)用程序,這是個(gè)令人不愉快的數(shù)量啊。 Designing a Database Application in VB 1 By Errol Booysens Difficulty: Beginners to Intermediate Demo: None Summary Before you start to design a database, it’s important you understand exactly what a database is and what types of databases you have to choose from. The application type will affect the database type that you choose. What Is a Database? A database is really a system that contains many different objects used together to allow your application fast and efficient access to the data. You can use many examples of databases with your application. The most mon of these are as follows: Microsoft Access。 Microsoft FoxPro。 Oracle Personal Edition 7i or 8i。 and MS SQL Server is only a few to mention. All these databases can run on a standalone puter and allow you to create very plex databases for your applications. Picking the right database for your application is extremely important, because the wrong one will affect performance and make your job as a developer so much more difficult. Before starting the design process, you need to select a database. When working with Visual Basic, the database that you can choose from fall into two distinct groups: Local Databases can be accessed directly from Visual Basic through Visual Basic’s database Jet engine。 and Remote databases cannot be accessed by using Visual Basic’s standard database access capabilities. Understanding the differences will help you select the correct database for your application. However, in Visual Basic 6, there is now a way to access both local and remote databases using the same database access controls and objects known as the ActiveX Data Objects. Understanding Universal Data Access (UDA) As databases have grown and moved off the local puter and onto worked database servers, the methods employed to access the databases have changed. Microsoft has addressed these changes by developing strategy to allow for any pany or database to be accessed the same way. This is called Universal Data Access, or UDA. Understanding what UDA means is not as simple as understanding to use it. The reason for this is that UDA is a set of rules and access methods that must be followed by any pany that is creating a database access method to be used. This allows you, the programmer, to access any database the same way But what is UDA? Universal Data Access is a platform, applications and tools concept that Microsoft has developed that defines and delivers the standards for all future application development. Using UDA standards will provide high performance access to many types of data and information that reside on multiple platforms, and a programming interface that will work with almost any tool or language using the skills that developers already have. This is acplished by using Microsoft’s Data Access Components (MDAC), as well as an integrated set of technologies, which include ActiveX Data Components (ADO), OLE DB, and Open Database Connectivity (ODBC). The benefits of using these standards include the following: High performance access to data – Provides the ability to scale any application or ponent to support concurrently connected users without losing performance。 Reliability – Reduces the number of ponents to support on the client PC。 and Wide industry support – Many vendors including Microsoft have already announced support for the UDA standards.