A Relational Database Primer

April 6, 2011 at 4:55 pm | Posted in Oracle, Technical Tips | Leave a comment
Tags: , , , , , , ,

If you are one of the many IT pros who are familiar with relational databases, then you’re probably at least somewhat knowledgeable about SQL. Your experience may come from SQL Server, Oracle, DB2, or even Microsoft Access. You might think of these as different “brands” of relational databases, but in fact all of these applications use SQL as their tool for manipulating the stored data.

One set of SQL statements is referred to as DML, or Data Manipulation Language. These are the SQL statements such as INSERT, UPDATE, DELETE, and SELECT. These statements perform the actions you would expect on the rows stored in the tables of a Relational Database Management System (RDBMS). Tables, like spreadsheets, contain rows and columns of data. You can also think of a table like a physical flat file, except the records in the file are called rows in the table, and the fields in the file are called columns in the table. Relational databases, however, are much more powerful than flat files or spreadsheets when it comes to manipulating and extracting data.

Another set of SQL statements is referred to as DDL, or Data Definition Language. These are the SQL statements such as CREATE, ALTER, and DROP. Before you can store rows in a table, you must first CREATE a table. Then you can INSERT rows into that table. For example, if the table was named CUSTOMER, you would likely have one row in the CUSTOMER table for each customer of your company. Each row may contain columns to store specific data about that row, such as Customer ID, Customer Name, or Customer Address. If your business had 575 customers, then there would be 575 rows in the CUSTOMER table. If the value of a row changes, such as when a customer’s address changes, you would perform an UPDATE. If a new company became a customer, you would perform an INSERT. If a customer went out of business and consequently was no longer a customer of yours, you would perform a DELETE for that row. If the entire CUSTOMER table, along with all of its rows was no longer needed, you would DROP the CUSTOMER table.

I hope this gives you a little insight into relational databases and how the SQL language plays a very crucial role in controlling and manipulating the actual content in the database. Drop me a line in the blog if I can answer any specific questions you might have.

–Bob Bungenstock

Leave a Comment »

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: