A Practical Approach to Database Theory
| Introduction | Normalization | Queries | SQL | Data Access Objects |
A Practical Approach to Database Theory
Database development is unlikely to score very well with VB programmers for popularity. Yet, like it or not, 90 % of the work a professional Visual Basic developer does is likely to be database related.
One reason is that VB is particularly well suited to database work. Another is that very much development is database related. Those who are willing to pay for your services are businesses, and they use computer systems mainly for basic office work and database work. The former is handled by generic tools like Microsoft Office. The latter is often handled by tailor-made tools, and this is where you come in.
In smaller projects, some of which I've had the mixed pleasure of working, the basic design choices behind the database is done by someone who have no grasp of database design, and who claims to "not have time" to learn it. The authorities thankfully don't allow that approach to driving a car. The databases coming out of these operations leave a lot to be desired.
Here is very basic vocabulary for database work:
| Term | Meaning |
| Column | Interchangable term for field in database description. E.g. name, phone number, price or any other single item of a database is a column of data in a table. The smallest item that are addressable by the relational database engine (but of course, its content can be further analyzed with VB code) |
| Database | The whole set of tables that make up all relevant data for a project or system. |
| Field | See column. |
| Record | Corresponds to each card in a cardfile. In relational databases, and VB terminology, it is often replaced by the term row. |
| Row | Corresponds to record, which would be individual cards in a cardfile. |
| Table | Each two-dimensional data array in a system is called a table. Tables consist of rows (corresponds to cards in cardfile) and individual rows which are fields of the table. |
Table of Contents
[TIP] Few who do serious database work in VB can do without Microsoft Access. Most things you can do with Access can be done in VB, but it's so much easier to create, format and manipulate databases in Access you will find it worth the cost. More likely than not, you will find use for other Office components as well (like Excel, Outlook, and Word), so do check out Microsoft Office 97 Professional which comes with Access. There is also a Developer's Edition available which allows you to create and distribute runtime Access database products.
| Joe Garrick has a "Database Programming Corner" at his also otherwise excellent VB web pages. Visit http://www.citilink.com/~jgarrick/vbasic/database, where you will see one of the best series of articles available on various aspects of VB database programming (general theory, dao, Jet, sql). |

Comments
ALL the sub-article links are dead ... :-(
Posted by loquin on 05/20/2008 01:24pmI wanted to add a link to this article at a programming forum, but, when I checked it out, I found that ALL FOUR of the sub-article links are dead. That is the bulk of the article - the 'Meat & Potatoes' of it... This is EXTREMELY unfortunate, as this article transcends programming language, and OS version. It is the basic information needed to understand the underlying backbone of the IT field - databases. (Although it uses MS Access as the demo tool, all the other OS's have similar desktop database applications that can be used to demo the same techniques.) This means that this single article supports operating systems, and programming languages, current, and future. Every single one. It is VERY important that it be restored, if at all possible.
Replyconnecting to an access database by ado control
Posted by saitanay on 05/27/2006 11:52pmi am a beginner and tried a login screen 4 my vb app.. code.. =========================================== ------------------------------------------- Private Sub Command1_Click() Dim uname As String Dim pwd As String uname = Form1.Text1.Text pwd = Form1.Text2.Text Do Until Form1.Adodc1.Recordset.EOF If uname = Form1.Adodc1.Recordset.Fields("userid").Value And pwd = Form1.Adodc1.Recordset.Fields("password").Value Then Form1.Hide Form2.Show Exit Sub Else Form1.Adodc1.Recordset.MoveNext End If Loop End Sub ------------------------------------ ==================================== At the execution of ------------------------------------- Do Until Form1.Adodc1.Recordset.EOF ------------------------------------- i am getting an error 91:object variable or with block variable not set i connected an ms access database by ADO controlReplydhachin
Posted by Legacy on 12/20/2001 12:00amOriginally posted by: dhachin
yes very good
Reply