Demand Your Training Now
About ITTOD Articles & Tutorials Contact Us Government Training Course Catalog
.NET
See all .NET Courses >  
Oracle
See all Oracle Courses >  
Articles & Tutorials    

What is SQL?
Digg! Yahoo! Del.icio.us! Blinklist ma.gnolia! Newsvine Reddit! Simpy

SQL is a computer language designed for working with relational databases, such as those you'd find at a university or business. The commands within SQL allow the user to retrieve, manage, and do other things with information found in the database.


What does SQL do?

In general, there are several types of actions someone working with a database may want to take. The first is to "grab" a piece of information. In order to do this, you simply describe what you want, using SQL's declarative statements, and your SQL-understanding database will take care of the rest.

If you owned a candle company, and were working with your trusty bookkeeper, John, you might ask the following of him:



"Can you show me a list of all the types of candles from 2002 on, and sort
them by how many we have left?"




Think about the data involved here. You need a list of candles, from 2002 or later, and you want them sorted by remaining inventory. John could probably do this, but he'd certainly take a while to do it on paper. In fact, even if he had the records stored electronically, it'd likely take him a fair amount of effort to pull them up, remove irrelevant data, and sort them the way you asked. If you had a lot of candles, and asked a lot of these questions, John would probably be about ready to hang up his ledger and go home.


If, however, your candle inventory was stored in an Oracle database, or some other SQL database, John could simply write the following SQL query in about 45 seconds.


SELECT *

FROM candles

WHERE year > 2002

ORDER BY inventory;

Just like that, John's done, and you have the information you requested. Now, this is a very simple query, but already you can probably see how amazing relational databases must have seemed in the late 1970's, when they became commercially available. All of a sudden, gigantic piles of data could not only be stored; they could be manipulated, filtered and sorted exactly the way you wanted with just a few commands.

Plus, SQL is about more than just reporting. There's a whole language, literally, dedicated to data manipulation, appropriately known as Data Manipulation Language. With DML commands, you can actually add, delete, truncate, and generally overhaul your data from a simple SQL query, meaning that everything from reporting to database maintenance scripts (i.e., "remove everything with no inventory older than 5 years") can essentially be automated. Simply write your scripts, test them, and set them to run automatically. You'll wake up with your data sorted just the way you like it, and go to bed with a clean database.


Why should I learn SQL?

SQL isn't the only way to query data from a relational (or otherwise) database. However, it has a couple of notable advantages that are important to be aware of.


It's been around forever - SQL is actually the great grandchild of SEQUEL, which was invented three decades ago, and has been formally standardized since 1986. In the realm of computer standards, that's absolutely ancient, and it's because no one has come up with a better way to crawl through data yet.
It's easy to use - Sure, it's programming, but as far as computer languages go, SQL is a cakewalk. Basic commands (SELECT, WHERE, ORDER) as well as hose in the system's DML (CREATE TABLE, etc.) are essentially English, and white space is ignored, which allows for clean, readable code. Look back to the example displayed earlier in this article, and try to convince yourself you can't figure out what that code means.
It's everywhere - Since SQL is old, and everywhere, it's well supported by just about everyone, from IT staffs to internet service providers (ISPs). While various database vendors may work with SQL differently, the basic core knowledge involved in writing queries is useful pretty much without exception.


If you have even a slightly unmanageable amount of data, and you'd like to be able to work with it (especially remotely, via the internet), an SQL-database is the way to go. And if you're going to go through the effort of setting up a database, why not master the relatively easy-to-learn language that powers it? With just a little bit of training, you can be the one with total control over your data -- you might even be able to get rid of John.

Here are some training courses that match this article:
Microsoft SQL Server 2008 Database Development
Microsoft Visual C++ .NET: Developing C++/CLI Applications
Windows SharePoint Services 3.0
ASP.NET for PHP Developers: Introduction to ASP.NET
Windows Vista: Migrating to

See All Courses For Microsoft >



Privacy Policy | Disclaimer | Government Training
Copyright ITTOD | Call (888)-99-ITTOD