Relational DBMS (OLD) - Databases and ADO, OLEDB & ODBC

 CBSE Class 12 Informatics Practices

Revision Notes
CHAPTER -9
Databases and ADO, OLEDB & ODBC


The databases fall into two distinct groups:
1. LOCAL DATABASE
2. REMOTE DATABASE

ADO: ActiveX data object is an application program interface.
REVISING DATA CONCEPTS:
1. Database
2. Table
3. Recordset

Types of Recordset:
1. Table-type Recordset : representation in code of a base table that you can use to add, change, or delete records from a single database table (Microsoft Access workspaces only).
2. Dynaset-type Recordset : the result of a query that can have updatable records. A dynaset-type Recordset object is a dynamic set of records that you can use to add, change, or delete records from an underlying database table or tables.
3. Snapshot-type recordset : a static copy of a set of records that you can use to find data or generate reports. A snapshot-type Recordset object can contain fields from one or more tables in a database but can't be updated.
4. Forward-only-type Recordset : identical to a snapshot except that no cursor is provided. You can only scroll forward through records.
5. Dynamic-type Recordset : a query result set from one or more base tables in which you can add, change, or delete records from a row-returning query. Further, records other users add, delete, or edit in the base tables also appear in your Recordset.

DATA ACCESS MECHANISMS:
These are:

1. DAO-Data Access Object : DAO were originally called VT Objects.
2. RDO-Remote Data Objects :
3. ADO-ActiveX Data Objects

NOTE:ODBC: Open Data Base Connectivity refers to a standard protocol that permits applications to connect to a variety of external database servers or files.
ADO AND OLE DB: Data Provider:
Data Provider is a control or object or mechanism that provides data for use by connecting to a source of data.

OLE DB: It is the underlying system service that a programmer using ADO is actually using OLEDB is a set of interfaces that provide applications with uniform access to data stored in diverse information sources.

ACCESSING DATABASE USING ADO DC: VB uses ADO DC in two ways:
1. employing ADO DC interactively using VB connection wizard.
2. or writing code.ie, programming ADO(ADO DB)

Basic Working Model of ADO:
Step 1: Connect to a data source.
Step 2: Specify a command to gain access to the data source.
Step 3: Execute the command.
Step 4: Store the rows in a cache.
Step 5: Update the data source.
Step 6: Detect Errors.

USING ADO PROGRAMMATICALLY:
It comprises of seven classes or objects:
1. Connection.
2. Recordset
3. Field
4. Command
5. Error
6. Parameter
7. Property

Of the above seven objects four objects are primary objects:
1. Connection.
2. Recordset
3. Fields
4. Command

ADO Events:
There are two families of events:
1. ConnectionEvents.
2. RecordsetEvents.

DATA BOUND SUBFORMS:
Subforms aredata entry forms that actually contain two forms within the same screen. Subforms are also called Master/detail forms.

ADO and ODBC:
ODBC is a standard API for database acces that offers standard definitions of how to talk to databases of all kinds.ODBC was something that all DB vendors could agree to and something that did all of the basic things.

DSN:
Data Source Name is a logical name used by open database connectivity(ODBC) to refer to the drive and other information required to access data.
ODBC is a standard API for database access that offers standard definitions of how to talk to databases of all kinds.