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

  1. Normalization
  2. Queries
  3. SQL
  4. Using Data Access Objects

[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:24pm

    I 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.

    Reply
  • connecting to an access database by ado control

    Posted by saitanay on 05/27/2006 11:52pm

    i 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 control

    Reply
  • dhachin

    Posted by Legacy on 12/20/2001 12:00am

    Originally posted by: dhachin

    yes very good

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

  • Do you know where your data is? Consumer cloud-based file sharing services store your sensitive company data on servers outside of your control, outside of your policy and regulatory guidelines – maybe even outside your country – and not managed by you. The potential for data leakage, security breaches, and harm to your business is enormous. Download this white paper to learn about file sync and share alternatives that allow you to manage and protect your sensitive data while integrating and …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds