SQL (Structured Query Language)
SQL is the language used to work with relational databases. SQL statements are referred to as queries and typically they have the capability to INSERT, UPDATE, and DELETE database records as well as create tables, alter tables and others.
When used in a web application, SQL is typically used in the server side code – PHP, Java, Ruby, etc. Below is an example of where SQL might fit into a web application.
- User types their zip code into a web form and clicks a submit button.
- The zip code is sent to the web server and processed in PHP code.
- The PHP code forms an SQL query using the zip code. Maybe: SELECT * FROM cities WHERE cities.zip = ’12345′
- The SQL query will return all the records, in this case, from the cities table that match the zip code the user provided.
- In PHP, we build a results page from the results of the SQL query and send it back to the user.
Depending on the server side language, frameworks, and libraries being used, the developer may not need to write the SQL queries himself. Frameworks often take care of this automatically for the most common cases.
At Fieldstone Software, we use SQL in almost every project. We regularly work with database servers. Normally, we use MySQL and SQLite. At our clients request, we also work with MSSQL, Oracle, and MS Access on some projects.
P.S. That cat picture has nothing to do with SQL but we couldn’t find a picture that did. Enjoy.
