Wave Dynamics Articles 

coffee cup on table

Harness the Power of Database Centered Web Applications

        by Randy Ashbaugh

August 16, 2011

    Companies like Wave Dynamics of Greenville, South Carolina specialize in creating database centered- web based computer applications. In layman’s terms this is a software program that can be accessed from any internet browser and can access data stored in a central relational database. These applications are an effective way to integrate and streamline your business avoiding the common problem of duplicate and usually conflicting data stored in separate files across your organization. With this new approach everyone will be working with the same accurate information. This article will attempt to examine the relational model and its relevance to creating database applications in Visual Basic .NET. First we will look at the history and basics of relational databases and some of the precautions needed when using related tables. Then we will describe ADO.NET and how it is changing the way we develop database applications. Third, we will examine strategies, strengths and limitations of implementation of databases and database applications on networks and local systems. Finally, we will conclude with a summary of our findings. So let’s take a look at the relational model.

    The Relational Model was first presented by Dr. Edgar F. Codd in a 1970 report to IBM (No Author, 2010). It was essentially an alternative to the Hierarchical and Network Models which it eventually replaced. The Hierarchical method basically stored files of information in a simple parent / child relationship, and each file could only have one parent, which didn’t represent the real world very well. The Network model went a bit further in that it could handle many to many relationships, but required these relationships to be pre-built. There are three types of relationships in the relational model. The first is the one-to-many relationship. This basically means that one record in the parent table relates to one or more records in the child table (Bradley, 2010). The second type of relation is the many-to-many relationship which basically means many records in one table can have many records in another table. SQL cannot handle this relationship directly and requires a junction table to link the records (Bradley, 2010). The last type is the least common and is called a one-to-one relation. This means one record in the parent table relates to one record in the child table (Bradley, 2010). Usually in a case like this, the two tables are separate but could easily be combined.  Examples of these are shown in Figure 1.

 

     The Relational Model as presented by Cobb allows us to model the relationships of the data sets in a way that frees us from having to know the physical storage structure of the data. And it provides a method by which we can set constraints on the data to prevent corruption of the data sets. Cobb’s original ideas centered around a flexible model that maintained data type integrity and ensured that if a key piece of data was contained within multiple tables, it would be updated in all tables when it was changed without the user having to explicitly know that it had to be done. In other words the Database System automatically manages this aspect so the user can focus on what matters, that is the retrieval of the necessary data. So in summary the Relational model has three main advantages (No Author. 2010). It maintains a clear boundary between the logical and physical aspects of the data. It provides a very simple and easy to understand data structure that contains a primary key column which uniquely identifies each individual record in a database table. And lastly, it has a solid theoretical background, making it a clear science that can be understood by all and has rules that make perfect sense in practice no matter what data is being modeled. Even with these advantages, database applications programmers still had to write significant code to create a database application. They had to do this because they still needed to query the data and then write code to bind the data to the controls of the application. To address this issue, ADO.NET was developed.

     ADO.NET is a set of components used to allow multitier applications development. The ADO.NET works closely with XML to provide a data exchange object called a DataSet which can be easily populated with data from an XML source (No Author2, 2010). This allows the database applications programmer to interact with a data source in a disconnected way allowing ADO.Net to handle the details of communication. The DataSet object contains four other objects. The first is the Command Object which enables direct access to the database to retrieve data, run stored procedures, and send or retrieve parameter information. The second is a Connection Object that provides the connection to the data source. Third is the DataReader, it provides a way to read a stream of data from the data source. And last is the DataAdapter, which loads the DataSet and updates the data source when changes have been made in the application. ADO.NET takes on many of the jobs of querying data so the developer need only worry about the details of what the application needs to do, not how to query and change the data. This brings us to the last subject which centers on strategies, benefits, limitations and precautions of deploying database applications.

     Having database applications is clearly a benefit to an organization. It enables employees to interact with a database without having intricate SQL knowledge or having to interact directly with the server database. You, as the developer, can control what can be done in the way of viewing or changing data. The SQL server takes care of making sure the rules of the relational database are followed thereby preventing database corruption. There are some limitations to deploying database applications. Mainly these limitations center around changes made to the database itself. Additions to a database in the form of tables and fields is generally not an issue. Whenever these are added you can simply add functionality to you database application to interact with these new tables and fields. Removal of any tables and fields becomes more of an issue as interdependencies established previously would be broken and could cause the application to fail. Database security is also an issue that the developer needs to consider. Most of this is handled by the server database, but it is important to understand how to keep the data secure. Things like SQL injections, which is SQL code injected into the system through your application in order to gain access to your database, need to be considered.  

     In conclusion the Relational Database Model is the best solution to store related data. Many are working to find better solutions, but to date none have been found that work better. The introduction of Object Oriented Programming (OOP) has given us a wonderful opportunity to create database applications in which objects handle much of the communications between our application and the database without our direct intervention. It has also enabled us to develop multitier applications without direct connections to a database, which can effectively leverage the power of the internet.

References

Bradley, J.C. Millspaugh, A.C. (2010). Advanced Programming Using Visual Basic 2008.

New York, NY: McGraw Hill.

No Author. (2010). Relational Model.

GeekInterview.com. Retrieved : July 6, 2010 from:

http://www.learn.geekinterview.com/it/data-modeling/relational-model.html

No Author2. (2010). Overview of ADO.NET.

msdn. Microsoft Corporation. Retrieved : July 6, 2010 from:

http://msdn.microsoft.com/en-us/library/h43ks021(VS.71).aspx