Documents

Delphi - Database Application Developer's Book - Delphi for Windows.pdf

Description
Database Application Developer’s Guide Delphi for Windows C h a p t e r 1 I n t r o d u c t i o n Copyright Agreement Delphi enables you to create robust database applications quickly and easily. Delphi database applications can work directly with desktop databases like Paradox, dBASE, the Local InterBase Server, and ODBC data sources. The Delphi Client/Server edition also works with remote database servers such as Oracle, Sybase, Microsoft SQL Server, Informix, InterBase, and ODBC data sources
Categories
Published
of 207
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Related Documents
Share
Transcript
  I n t r o d u c t i o n 1 Delphi for Windows CopyrightAgreement Chapter 1Introduction Delphi enables you to create robust database applications quickly and easily. Delphi database applications can work directly with desktop databases like Paradox, dBASE, the Local InterBase Server, and ODBC data sources. The Delphi Client/Server edition also works with remote database servers such as Oracle, Sybase, Microsoft SQL Server, Informix, InterBase, and ODBC data sources. Delphi client applications can be scaled easily between mission critical network-based client/server databases, and local databases on a single machine. This chapter introduces Delphi’s database tools, including the Data Access and Data Controls component pages, the Fields Editor, the Database Desktop, and the Database Forms Expert. What you should know first Building a database application is similar to building any other Delphi application. This  book assumes you understand the basic application development techniques covered in the Delphi User’s Guide , including:ãCreating and managing  projectsã Creating  forms and managing  units ãWorking with components ,  properties,  and events ãWriting simple Object Pascal source codeYou also need to have a working knowledge of the Database Management System (DBMS) your Delphi database applications access, whether it is a desktop database such as dBASE or Paradox, or an SQL server. For information specific to building client/server applications with Delphi, see Chapter 6, “Building a client/server application.”This book assumes you have a basic understanding of relational databases, database design, and data management. There are many third-party books covering these topics if you need to learn more about them. Database Application Developer’s Guide  2 Database Application Developer’s Guide Overview of Delphi’s database features and capabilities A Delphi database application is built using Delphi database development tools, Delphi data-access components, and data-aware GUI components. A database application uses Delphi components to communicate with the Borland Database Engine (BDE), which in turn communicates with databases. The following figure illustrates the relationship of Delphi tools and Delphi database applications to the BDE and data sources: Figure 1.1 Delphi database architecture The following table summarizes Delphi’s database features. Table 1.1 Database features summary ToolPurpose Data Access componentsAccess databases, tables, stored procedures, and custom component editors.Data Control componentsProvide user interface to database tables.Database Desktop (DBD)Create, index, and query Paradox and dBASE tables, and SQL databases. Access and edit data from all sources. InterBasefor Windows Borland Database Engine (BDE)/IDAPI Local Data Sources   ParadoxdBASERemote Data Sources OracleSybase   InformixInterBase Delphi IDEDatabase   Desktop (DBD)ReportSmithSQL LinksODBC Drivers TCP/IP, SPX/IPX, etc. BDEConfigurationUtility ReportSmith Drivers ASCII . . . Delphi Application Report  Introduction 3 These features enable you to build database applications with live connections to Paradox and dBASE tables, and the Local InterBase Server through the BDE. In many cases, you can create simple data access applications with these components and their properties without writing a line of code.The BDE is built into Delphi components so you can create database applications without needing to know anything about the BDE. The Delphi installation program installs drivers and sets up configuration for Paradox, dBASE, and the Local InterBase Server, so you can begin working with tables native to these systems immediately. The BDE Configuration Utility enables you to tailor database connections and manage database aliases.Advanced BDE features are available to programmers who need more functionality. These features include local SQL, which is a subset of the industry-standard SQL that enables you to issue SQL statements against Paradox and dBASE tables; low-level API function calls for direct engine access; and ODBC support for communication with other ODBC-compliant databases, such as Access and Btrieve.Delphi includes Borland ReportSmith, so you can embed database report creation, viewing, and printing capabilities in Delphi database applications. Delphi also includes the Database Desktop (DBD), a tool that enables you to create, index, and query desktop and SQL databases, and to copy data from one source to another. For more information about ReportSmith, see Creating Reports . For more information about the DBD, see Appendix A, “Using Database Desktop.”The Local InterBase Server is a single-user, multi-instance, 16-bit, ANSI SQL-compliant, Windows-based version of Borland’s 32-bit InterBase SQL server that is available for Novell NetWare, Windows NT, and Unix. For more information, see the Local InterBase Server User’s Guide .The following table lists the additional database features available in the Client/server edition of Delphi. These features extend Delphi’s database capabilities to access remote ReportSmithCreate, view, and print reports.Borland Database Engine (BDE)Access data from file-based Paradox and dBASE tables, and from local InterBase server databases.BDE Configuration UtilityCreate and manage database connection Aliases used by the BDE.Local InterBase ServerProvides a single-user, multi-instance desktop SQL server for  building and testing Delphi applications, before scaling them up to a production database, such as Oracle, Sybase, Informix, or InterBase on a remote server.InterBase SQL LinkNative driver that connect Delphi applications to the Local InterBase Server. Table 1.1 Database features summary (continued) ToolPurpose  4 Database Application Developer’s Guide SQL database servers such as Sybase, Microsoft SQL Server, Oracle, Informix, and InterBase.SQL Links provide Delphi applications with SQL access to data residing on remote servers, including Sybase, Microsoft SQL Server, Oracle, and Informix. When an SQL Link driver is installed, SQL statements are passed directly to the server for parsing and execution. For more information about using passthrough SQL, see Chapter 5, “Using SQL in applications.” What is a database? Delphi programmers should understand some basic concepts about databases, data, and data access, before building database applications. A database consists of one or more tables, where each table contains a series of columns into which records (also called “rows”) are stored. Each record is identical in structure. For example, a database of addresses consists of a table with name, street address, city, state, and zipcode columns. The intersection of a single column and row is referred to as a field. Fields contain values. The following figure illustrates these concepts: Figure 1.2 Structure of a table The current  field  is one field in a single record. The current record  is a single record in a multi-record set that is the focus of attention. For example, some Delphi database applications display multiple columns and records in a grid format for editing. As far as Delphi controls are concerned, only one field in a single record is “current,” meaning that editing tasks affect only the data in that field.Different databases vary widely in structure. A database in Paradox consists of one or more files, each of which contains a single table or index, but an SQL relational database on a remote server generally consists of a single file that contains all tables, indices, and Table 1.2 Additional Delphi Client/Server database features ToolPurpose SQL DriversBoth SQL Links and ReportSmith provide native drivers that connect Delphi database applications to remote SQL database servers, such as Oracle, Sybase, Microsoft SQL Server, Informix, and InterBase.Visual Query BuilderCreates SQL statements by visually manipulating tables and columns. CustNoNameStreetCity1221123112511254Kauai Dive ShoppeUniscoSight DiverCayman Divers Wo4-976 Sugarloaf HighwayPO Box Z-5471 Neptune LanePO Box 541Kapaa KauaiFreeportKato Paphos Column namesRecordsCurrent recordCurrent field
Search
Tags
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks