13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<br />

1–6<br />

As shown in Figure 1–2, when you execute an application that accesses a MS <strong>SQL</strong> <strong>Server</strong><br />

database, the compiler translates ABL or SpeedScript statements into their <strong>SQL</strong> equivalents.<br />

The <strong>Data</strong><strong>Server</strong> then issues the <strong>SQL</strong> statements to the ODBC driver through the ODBC API.<br />

The driver, which provides the software mechanisms <strong>for</strong> accessing and controlling the data<br />

source, processes the <strong>SQL</strong> statements, transfers them to the data source manager, and returns<br />

the results to <strong>OpenEdge</strong> through the ODBC API.<br />

Note: The <strong>SQL</strong> presented in Figure 1–2 has been simplified <strong>for</strong> the purpose of focusing on<br />

the data flow.<br />

To facilitate the flow of statements between client and server, the <strong>Data</strong><strong>Server</strong> places <strong>OpenEdge</strong><br />

equivalents <strong>for</strong> data definitions from a supported data source into a schema holder (a repository<br />

<strong>for</strong> data definitions <strong>for</strong> one or more MS <strong>SQL</strong> <strong>Server</strong> data sources). When the <strong>OpenEdge</strong> client<br />

or WebSpeed Agent executes statements and retrieves in<strong>for</strong>mation from the data source, it relies<br />

on data definitions in the schema holder.<br />

Schema holder<br />

As noted in the previous section, a schema holder contains in<strong>for</strong>mation about the MS <strong>SQL</strong><br />

<strong>Server</strong> data sources. This in<strong>for</strong>mation, called the schema of the data source, is a description of<br />

its structure, its tables, the fields within its tables, and its indexes.<br />

<strong>OpenEdge</strong> accesses the schema holder only when it compiles procedures and at the beginning<br />

of a runtime session <strong>for</strong> schema caching (the loading of data definitions into memory).<br />

Typically, the schema holder is not accessed during a runtime session after the initial schema<br />

caching.<br />

Be<strong>for</strong>e an <strong>OpenEdge</strong> client can access data in the MS <strong>SQL</strong> <strong>Server</strong> data source, you must create<br />

a schema holder and load the required data source definitions into the schema holder. You can<br />

then use the <strong>Data</strong> Dictionary to add <strong>OpenEdge</strong> database features such as validation expressions<br />

and messages.<br />

Figure 1–3 illustrates the schema-loading process.<br />

<strong>OpenEdge</strong> schema holder<br />

Cust_num INTEGER<br />

Name CHARACTER<br />

Max_credit DECIMAL<br />

Figure 1–3: The schema-loading process<br />

<strong>Data</strong> source<br />

data definitions<br />

Cust_nm INT<br />

Name VARCHAR<br />

Max_credit DECIMAL

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!