Home » ASP.NET Basics » 09 - Working with Data
9

Database Basics

Overview of databases

Handling data is the most common task that any real life application can perform. Data can be stored in a simple text file, an XML file or an advanced database software like Microsoft Access, SQL Server or Oracle. As a developer, our job is to write code that will access the data from the source and display it to the end user. Sometimes, we may need to write code that will edit or delete the data.

Although the data can be stored using different methods such as a text file or an XML file, the most popular method is to store the data in relational databases. In a relational database, the data is stored in tables. Tables are made up of columns and rows. Let us look at the following example:

Book Title

Author

Publisher

ASP.NET 2.0 Revealed

Patrick Lorenz

Apress

Professional VB 2005

Bill Evjen

Wrox

Microsoft Visual Basic 2005 Step by Step

Michael Halvorson

Microsoft

The table shown above has three columns. Each column stores a specific type of data: Book Title, Author's name and publisher's name. Actual data (details of the books) are stored in rows, one after another. These rows are also called records.

This method of storing data in a rows and columns format is very easy to understand. That is why the relational databases are the most commonly used type of database. However, we need special software for using relational databases. Softwares like SQL Server 2005 and Oracle are used for working with relational databases.

An important part of the relational databases is the SQL language. SQL stands for Structured Query Language. This is the language we can use to `talk' to the relational databases. SQL is used for retrieving data from the database, adding data to or deleting data from the database, editing the existing data in the database and even add new tables in the database.

Learning SQL is vital for working with relational databases. However, SQL is a detailed if not complex topic. So what should we do if we do not know how to use SQL? Once again, the VWD IDE is here to help us. We can create the SQL statements for retrieving data from the database without knowing the language. We will use the visual method and the VWD IDE will generate the required SQL statement for us.