SQL CODING FOR BEGINNERS
AN ESSENTIAL TOOL FOR DEVELOPERS USING STATEMENTS FOR CONTROLLING AND MODIFYING TABLES, AND AN INTERMEDIATE-LEVEL GUIDE FOR LEARNING SQL PROGRAMMING STEP BY STEP
[Tony Coding]
Text Copyright [Tony Coding]
All rights reserved. No part of this guide may be reproduced in any form without permission in writing from the publisher except in the case of brief quotations embodied in critical articles or reviews.
Legal & Disclaimer
The information contained in this book and its contents is not designed to replace or take the place of any form of medical or professional advice; and is not meant to replace the need for independent medical, financial, legal or other professional advice or services, as may be required. The content and information in this book has been provided for educational and entertainment purposes only.
The content and information contained in this book has been compiled from sources deemed reliable, and it is accurate to the best of the Author's knowledge, information and belief. However, the Author cannot guarantee its accuracy and validity and cannot be held liable for any errors and/or omissions. Further, changes are periodically made to this book as and when needed. Where appropriate and/or necessary, you must consult a professional (including but not limited to your doctor, attorney, financial advisor or such other professional advisor) before using any of the suggested remedies, techniques, or information in this book.
Upon using the contents and information contained in this book, you agree to hold harmless the Author from and against any damages, costs, and expenses, including any legal fees potentially resulting from the application of any of the information provided by this book. This disclaimer applies to any loss, damages or injury caused by the use and application, whether directly or indirectly, of any advice or information presented, whether for breach of contract, tort, negligence, personal injury, criminal intent, or under any other cause of action.
You agree to accept all risks of using the information presented inside this book.
You agree that by continuing to read this book, where appropriate and/or necessary, you shall consult a professional (including but not limited to your doctor, attorney, or financial advisor or such other advisor as needed) before using any of the suggested remedies, techniques, or information in this book.
Table of Contents
Introduction
It is best to start at the beginning. SQL is a programming language that stands for Structured Query Language, and it is a simple language to learn considering it will allow interaction to occur between the different databases that are in the same system. This database system first came out in the 70s, but when IBM came out with its own prototype of this programming language, then it really started to see a growth in popularity and the business world started to take notice.
The version of SQL that was originally used by IBM, known back then as ORACLE, was so successful that the team behind it eventually left IBM and became its own company. ORACLE, thanks to how it can work with SQL, is still one of the leaders in programming languages and it is always changing so that it can keep up with everything that is needed in the programming and database management world.
The SQL is a set of instructions that you can use to interact with your relational database. While there are a lot of languages that you can use to do this, SQL is the only language that most databases can understand. Whenever you are ready to interact with one of these databases, the software can go in and translate the commands that you are given, whether you are giving them in form entries or mouse clicks. These will be translated into SQL statements that the database will already be able to interpret.
There are three main components, and we will discuss these in more depth in the next chapter. But these main ones will be Data Control Language, Data Definition Language, and Data Manipulation Language.
To illustrate how this works, think about a simple online catalog that allows you to search. The search page will often contain a form that will just have a text box. You can enter the name of the item that you would like to search using the form and then you would simply need to click on the search button. As soon as you click on the search button, the web server will go through and search through the database to find anything related to that search term. It will bring those back to create a new web page that will go along with your specific request.
At first, this will seem really complicated, and you may be worried about how much work it will be to get it set up. But when you start to work on a few codes, you will find that it is not actually that hard to work with. Often, just reading out the SQL statement will help you to figure out what the command will do. Take a look at the code below:
DELETE
FROM students
WHERE graduation_year = 2014
Read that code out loud, and you can probably guess what will happen when you decide to execute your code. Most of the codes that are presented in the SQL will work like this, so you do not need to be an expert programmer to make the SQL language work for you. Considering this is a language that allows the authorized users to look through a database and find the information that they want, it makes sense that the SQL language is really easy to use.
SQL may sound like it is a complicated language for you to learn, but it is actually really easy to figure out. We will spend some time looking at all the different things that you can do when you decide to use the SQL language to help you control the database that you use in your company. It is made to be easy and to make things easier when you are working with the database, or when you are trying to make it easy on your user to find information and SQL certainly delivers on this.
Chapter 1: Basics of SQL
If you are interested in learning a new coding language, there are a lot of different options that you can choose from, and it really depends on what you are looking for and what you want to do with them. Some of these languages are good for helping you to create a good website. Some are better for beginners while others are good for those who are more advanced. Some are good for creating a smartphone application or for working on your own game to share with others.
Traditionally, many companies would choose to work with the Database Management System, or the DBMS to help them to keep organized and to keep track of their customers and their products. This was the first option that was on the market for this kind of organization, and it does work well. But over the years there have been some newer methods that have changed the way that companies can sort and hold their information. Even when it comes to the most basic management system for data that you can choose, you will see that there is a ton more power and security than you would have found in the past.
Big companies will be responsible for holding onto a lot of data, and some of this data will include personal information about their customers like address, names, and credit card information. Because of the more complex sort of information that these businesses need to store, a new Relational Database Management System has been created to help keep this information safe in a way that the DBMS has not been able to.
Now, as a business owner, there are some different options that you can pick from when you want to get a good database management system. Most business owners like to go with SQL because it is one of the best options out there. The SQL language is easy to use, was designed to work well with businesses, and it will give you all the tools that you need to make sure that your information is safe. Lets take some more time to look at this SQL and learn how to make it work for your business.