Site hosted by Angelfire.com: Build your free website today!

Accessing Databases from Applications

 

1.  What are the functions of ODBC?

      ODBC refers to Open Database Connectivity, and some of its functions are:

·        Enables applications to communicate with a variety of databases, such as Oracle and SQL Server

·        Facilitates SQL grammar conversion

·        Enables a single application to use different drivers

·        Enables applications to interact with different types of database using database features that exceed the features supported by a particular RDBMS

·        Allows the use of enhanced RDBMS features

·        Enables applications to achieve a three-layered architecture

2.  What are the components in the ODBC and what the interaction between them?

3.  What is the difference between the types of DSNs?

DSN refers to Data Source Name. There are three types of data sources:

4.  What is the UDA strategy?

      UDA removes the dependency on different tools and languages for data access. It is based on open standards. As a result, a number of third-party developers support this standard. To implement UDA, Microsoft provides Microsoft Data Access Components (MDAC). MDAC is a combined name for technologies such as ODBC, Object Linking and Embedding Database (OLEDB), and ADO. ODBC is developed to access relational databases. However, OLEDB, which is built along the same lines as ODBC, is created to access relational as well as non-relational data sources, such as SQL Server 2000 and FoxPro.

      More information at:

      http://www.topxml.com/conference/wrox/1999_dc/text/dinouda.asp   

      http://www.topxml.com/conference/wrox/1999_dc/Powerpoints/dinouda.pps

5.  What is the role of ADO in the OLEDB model?

      ADO (ActiveX Data Objects) represents an object mode that is interfaced with OLEDB providers. The ADO object model uses object-oriented programming techniques to communicate with the underlying data source. ADO is independent of any language or OLEDB provider. Any language that supports COM interfaces can use ADO. ADO creates a layer between the applications and the OLEDB provider. This layer is easy to use. In addition to retrieving and manipulating data, ADO has the following functionality:

6.  What are the objects in the ADO object model?

     The ADO object model consists of nine objects and four collections. Different objects are combined to form collections. The collections are available for different ADO objects. The nine objects are:

·        Connection

·        Error

·        Command

·        Recordset

·        Record

·        Parameter

·        Field

·        Property

·        Stream

The four collections are:

7.  What are the steps to access a database from an application by using ADO?

      Applications are programs that call the ODBC API (Open Database Connectivity Application Programming Interface) to communicate with the RDBMS. An application communicates with database by passing SQL statements to the RDBMS. To do this, the application first connects to the database and then passes the SQL statements. To establish a connection with an SQL database and execute statements against it, the following steps are required:

                  ConnectionString = “DSN + Projects;

                  User ID = sa;

                  Password = “”;

                  ConnectionString = “Provider=SQLOLEDB.1;

                  Persist Security Info=False;

                  User ID=sa;

                  Initial Catalog=Projects;

                  Data Source= (local)”

8.  Why is XML ideal for data interchange?

     The use of XML (Extensible Markup Language) helps to simplify the application architecture. It also leads to language independence. XML is compatible with low-level protocols such as HTTP because it can be used along with HTML to display data on the Web pages in a structured manner. This helps to place different objects of separate layers on different servers. Web clients, such as browsers, use HTTP to send request to Web servers. Based on the user requests, Web servers send the requested HTML page back to the user. This communication takes place over HTTP.

9.  What are the advantages of using XML?