Here I would like to share a little bit of how I begin learning coding database
programming, hope this will give some CONCEPT to new comers.
Recently when I visited some forums on the net, I found that mostly new comers
will have some problem on database connectivity whenever they tried to learn
out with some database programming either using VB or ASP.
For me, there is no magic behind this learning area where in common anyone
who are new to db programming should learn the architecture of current days database
management system. For instance as Microsoft has released its ADO (ActiveX Data
Object), there is a predefined hierarchy of data object modeling being implied
with the design. After all I can see the simplest way to elaborate is:
This is not the exact object module that Microsoft declared, but I can see
that here within this 3 sub, most people would focusing on ADODB nowadays unless
someone would really want to use DAO for Jet databases or some third party databases
like Oracle. Mostly ADODB can handle all but it has its own set of classes.
Ok, enough bed time story, here are some simple steps to begin:
- When trying to talk to the database, you need to establish a database connection.
Determine the type of database whether is it a MS SQL, Microsoft Access or Oracle.
- Determine what type of front-end interface you are using, either using VB,
ASP HTML or third-party like PHP or others.
- Also determine what type of design architecture you are using, either is
a stand-alone, client-server or multi-tier application.
In the lower level of programming, generally we need to have a database connection
established, then based on the connection, we need to start a channel which normally
we call the record-set, or command object if uses server side run. As you can
see here I am keener to MS SQL programming style.
Generally we will do the following methods to the channel, they are:
- Insert
- Update (Modify and Save)
- Delete
With a single connectivity pointed to the database, different record-sets can
be established and perform different activities mentioned. You can close the
record-set if it is not being used and as well as the database connection. There
are advanced topic where you can use Command object to fire server-side database
operation activities that are pre-programmed inside the server.
Another area is the knowledge called SQL (Structured Query
Language), it is a keyword to success on database programming. It is because
SQL statement would helps programmers to retrieve the correct records in terms
of records counts, data quality and efficiency.
This article is meant for beginners who are new to database programming using
any other front-end language. For further information, we can access to different
resources through the web or books; for starters, take a look at the Database
section of the Visual Basic
or ASP tutorials section.