Merits of Centralized System Architecture
Merits of Centralized System Architecture
Companies that needed real computing power turned to the mainframe computer,
which is centralized system architecture. The salient most feature of a centralized system
is that the only movement of marshalling are keystrokes between the client and the host
machine. Marshalling is the process of packing interface elements and sending them
across process boundaries. Thus in a centralized system, keystrokes are marshalling from
the terminal (client) to the host. The centralized system architecture is illustrated in fig.
Application
Data Data
Network Server
Keystrokes
Terminal
Character
Merits of two-tier
The merits of this two-tier model are – data access is simplified, allowing very
rapid development of applications. The GUI is bound directly to the data source and all
the details of data manipulation are handled automatically. But there is a disadvantage in
this, i.e. though the data access is simplified, it is less flexible due to which the user will
not have complete control of interactions with the data source.
Not Scalable: Inability of two-tier approach to grow beyond the physical boundaries of a
client and server machine.
Poor Performance: The graphical interface binding to the data consumes major
resources on the client machine, which results in poor performance and dissatisfied
clients.
Reuse: The time invested in designing and implementing components is not wasted as
they can be shared among applications.
Data Control: It binds data-aware control to Microsoft Access and other ODBC data
sources.
ODBCDirect: It allows accessing of ODBC data source through the RDO with ADO
objects, bypassing JET database engine.
Remote Data Objects (RDO): It provides a framework for using code to create and
manipulate components of a remote ODBC database system.
Remote Data Control (RDC): It binds the controls to an ODBC remote database.
Open Database Connectivity (ODBC): this is an API call interface to the open
Database Connectivity libraries and drivers to provide data access to Microsoft SQL
server and other database that provide an ODBC driver.
Active Data Object (ADO): This is a programming model that eliminates the need to
choose from among DAO and RDO and all other data access methods. It is designed to
provide a common bridge between different database, files systems and e-mail servers.
RDO’S
Remote Data Objects (RDO) is specifically designed to access remote ODBC relational
data sources, and makes it easier to use ODBC without complex application code. RDO
is a primary means of accessing SQL Server, Oracle, or any relational database that is
exposed with an ODBC driver.
There are ten objects in the RDO object model, as described in the following list.
• rdoEngine object The base RDO object. This object is created automatically
when you first access RDO in your application.
• rdoError object Handles all ODBC errors and messages generated by RDO.
This object is created automatically.
• rdoEnvironment object Defines a logical set of connections and transaction
scope for a particular user name. This object contains both open and allocated (but
unopened) connections, provides mechanisms for simultaneous transactions, and
defines a security context for operations on the database. This object is created
automatically.
• rdoConnection object Represents either an open connection to a remote data
source, or an allocated, but as yet unopened, connection.
• rdoQuery object An SQL query statement with zero or more parameters.
• rdoColumn object Represents a column of data, including data type and
common properties.
• rdoParameter object Represents a parameter associated with an rdoQuery
object. Query parameters can be input, output, or both.
• rdoResultset object A set of rows returned from a query.
• rdoTable object Represents the stored database definition of a table or view.
• rdoPreparedStatement object The rdoPreparedStatement object contains a
prepared SQL statement and collection of rdoParameter objects. The
rdoPreparedStatement object is obsolete (although still supported). You should
use the rdoQuery object instead.
With the Data Environment designer, you can accomplish the following tasks:
• Drag fields within a Command object from the Data Environment designer onto a
Visual Basic form or the Data Report designer.
Before you can access the Data Environment designer, you must reference it in Visual
Basic.
2. From the References dialog box, select Data Environment 1.0, and then click
OK.
The Data Environment designer is added to your Visual Basic project, the Data
Environment designer window appears, and a Connection object is added to your
Data Environment.
To access data using your Data Environment, you must create a Connection object.
Therefore, every Data Environment should include at least one Connection object. A
Connection object represents a connection to a remote database that is used as a data
source.
Upon adding a Data Environment to your Visual Basic project, the Data Environment
designer automatically includes a new connection, called Connection1. At design time,
the Data Environment opens the connection and obtains metadata from the connection,
including database object names, table structures, and procedure parameters.
-or–
Right-click your Data Environment designer and select Add Connection from the
shortcut menu.
Once you have added a Connection, the Data Environment is updated to show the
new Connection object. The default name for this object is "Connection,"
followed by a number, such as Connection1.
Command Objects
Command objects define specific detailed information about what data is retrieved from a
database connection. Command objects can be based on either a database object (such as
a table, view, stored procedure or synonym) or a Structured Query Language (SQL)
query. You can also create relationships between Command objects to retrieve a set of
related data in the form of a hierarchy
Once a Command object is added, the Data Environment's outline view shows the
new Command object. The default name for this object is "Command," followed
by a number, such as Command1.
Data report
A report is an effective way to present data in a printed format. You can display the
information the way you want to see it.
2. On the Project menu, click Add Data Environment to add a designer to your
project. If the designer is not listed on the Project menu, click Components.
Click the Designers tab, and click Data Environment to add the designer to the
menu.
Note The first four kinds of ActiveX designers loaded for a project are listed on
the Project menu. If more than four designers are loaded, the later ones will be
available from the More ActiveX Designers submenu on the Project menu.
3. On the Data Link Properties dialog box, click Microsoft Jet 3.51 OLE DB
Provider. This selects the correct OLE DB provider for accessing a Jet database.
5. Click the ellipsis button (…) next to the first text box.
6. Use the Select Access Database dialog box to navigate to the nwind.mdb file,
which is installed in the Program Files\Microsoft Visual Studio\Vb98 directory.
8. Right-click the Connection1 icon, and click Rename. Change the name of the
icon to Northwind.
9. Right-click the Northwind icon, and then click Add Command to display the
Command1 dialog box. In the dialog box, set the properties as shown below:
Property Setting
Command Name Customers
Connection Northwind
DataBase Object Table
Object Name Customers
10.
11. Click OK to close the dialog box.
12. Right-click the Customers command, and click Add Child Command to display
the Command2 dialog box. In the dialog box, set the properties as shown below:
Property Setting
Command Name Orders
Connection Northwind
DataBase Object Table
Object Name Orders
13.
14. Click the Relation tab. The Relate to a Parent Command Object check box
should be checked. The Parent box should contain Customers; both the Parent
Fields and Child Fields/Parameters boxes should contain CustomerID.
15. Click Add. Click OK to close the dialog box.
16. Set the properties of the project and designer according to the settings below, then
save the project:
Object Property Setting
Project Name prjNwind
DataEnvironment Name deNwind
Form Name frmShowReport
17.
1. On the Project menu, click Add Data Report, and Visual Basic will add it to
your project. If the designer is not on the Project menu, click Components. Click
the Designers tab, and click Data Report to add the designer to the menu.
Note The first four kinds of ActiveX designers loaded for a project are listed on
the Project menu. If more than four designers are loaded, the later ones will be
available from the More ActiveX Designers submenu on the Project menu.
2. Set the properties of the DataReport object according to the table below:
Property Setting
Name rptNwind
Caption Northwind Data Report
3. On the Properties window, click DataSource and then click deNwind. Then
click DataMember and click Customers.
4. Right-click the Data Report designer, and click Retrieve Structure.
5. From the Data Environment designer, drag the CompanyName field (under the
Customers command) onto the Group Header (Customers_Header) section.
6. Delete the Label control (rptLabel) named Label1.
7. From the Data Environment designer, drag the OrderDate field (under the
Orders command) onto the Details (Orders_Detail) section. Delete the Label
control.
8. Resize the Data Report designer's sections to resemble the figure below:
When you add a Data Report designer to your project, its controls are added to the
tab named DataReport. To use the standard Visual Basic controls, you must
switch to the General tab.
3. Click the CommandButton icon and draw a CommandButton on the form.
4. Set the properties of the Command1 control according to the table below:
Property Setting
Name cmdShow
Caption Show Report
5.
6. In the button's Click event, paste the code below.
7. Private Sub cmdShow_Click()
8. rptNwind.Show
End Sub
10. Click Show Report to display the report in print preview mode.