Login - UID:  
PSW:
Register Send PSW
Home
Articles
Products
About Us
FeedBack

SQL explained in short

SQL explained in short

Many people don't have to work with SQL directly, so be thankful. However programmers of websites usually have to, so here's a brief primer for what SQL does. And for those of you that don't have to deal with it, this little bit of knowledge won't hurt you either. It should be easy enough to follow along with.

SQL only performs 4 actions on data: Create, Destroy, Update and Find.

The easiest way to understand this is to open an XL spreadsheet (which is an example of a flat file database) Each Sheet in the XL spreadsheet is considered a table.

So to Create a Table would look like:

CREATE TABLE 'Address'
(
ID AutoIncrement,
Name String,
Street String,
City String,
State String,
Zip String,
Tele String,
Email String,
Website String
)

This would put the names of the fields across the top of the XL spreadsheet. and each row below would contain information about the people you put in.

To add data to it would look like:

INSERT INTO 'Address'
( Name, Street, City, State, Zip )
VALUES
('Michael', '120 w. Somewhere Rd', 'SomeTown', 'MA', '45031',)

To find everyone in SomeTown would look like:

SELECT *
FROM 'Address'
WHERE
City LIKE 'SomeTown'

To Update my Record would look like:

UPDATE 'Address'
WHERE
City LIKE 'SomeTown' AND
Name LIKE 'Michael'
SET
Tele = '888-555-1212',
Email = 'junk@junk.com'

And later to delete everyone from Royal Oak would look like:

DELETE FROM 'Address'
WHERE
City LIKE 'SomeTown'

And finally to destroy the Table would look like:

DROP TABLE 'Address'

Saying of the Day

You have an unusual magnetic personality.

Today is

Eliminate Data Modeling Time
What would happen if your project timeline spent no time formalizing a data model? Would it cost you the project? What if the application’s object model could serve as the data model? more...

Windows Vista error 0x0000007E
Windows Vista recently received an update from Microsoft causing the Blue Screen of Death more...

Ladder over mySQL
Use Ladder in your next Object Oriented Application to speed design time by reducing the need to develop two different object models. more...

Build Better Customer Information Systems with Ladder