SQL and Basic Statement

by Phuong H
In the article “Introduction to SQL” by authors Thomas A. McGlynn and Maria Nieto-Santisteban, the authors explain what is SQL and a few example how to use SQL. SQL is a Structured Query Language, “a language in which describes how to create, update and query relational database.” SQL also is useful to get information out of the database. There are different DBMS and within these DBMS they have their own command but standard SQL command like: “Select”, “Insert”, “Update”, “Delete”, “Create”, and “Drop” are the same through out all the DBMS so learning SQL is a big advantage for database user.

A few SQL syntax:

SELECT STATEMENT: SELECT columnName FROM tableName

Create a table: CREATE TABLE tableName (name dataType1 Null/Not Null)

Delete a table: DROP TABLE tableName

Adding a row: INSERT INTO tableName VALUES(val1, val2, …)

ORDER BY: SELECT columnName FROM tableName ORDER BY columnName ASC/DESC

*(ASC – ascendent, DESC – descendent)

To update : UPDATE tableName SET columnName1 = value  WHERE columnName2 = value

This is my first time learning about SQL even though I have learned about relational database prior to this class. Because of the small size of the database, I used to go directly into the database to update the data rather than using SQL. I can see that it will be hassle to update a big database without SQL. After the reading, I think SQL is easy to use and very useful for database user.

Source:
McGlynn, T. A., Nieto-Santisteban, Ma. (2007). The National Virtual Observatory Book. Astronomical Society of the Pacific, 382,645-656.

http://aspbooks.org/publications/382/645.pdf

5 thoughts on “SQL and Basic Statement

  • November 4, 2012 at 5:03 pm
    Permalink

    This is a very helpful article to read, especially helpful with the current project we were assigned. There are some SQL statements that I was unfamiliar with as well, so I have been “Googleing” some basic SQL. I would advise everyone new to do the same, because it has help as far as the project goes.

  • November 4, 2012 at 5:26 pm
    Permalink

    Thank you for the article, this is really useful for SQL beginner like me; the original article really explains all we need to know as beginners. For example, it explains basic knowledge about SQL, it teaches you how to build a database, creating a Namespace, creating a table, adding rows to a table… etc. I saved this article because it is really helpful to our project 2 assignment. Great work!

  • November 4, 2012 at 6:26 pm
    Permalink

    This is interesting. I had no idea what SQL was when I first came into this class but as we progress, it’s seems like SQL is like Java, a programming language for databases. I can see how SQL is very helpful when it comes to updating huge databases as instead of going into the database to update the data.

  • November 4, 2012 at 9:09 pm
    Permalink

    Thanks for sharing, it’s a very educational article. SQL is a standard interactive and programming language for querying and modifying data and managing databases; it’s a very helpful tool for database management. I have a little experience working with SQL, it is helpful, but sometimes very complicated. I hope as we go thru the course, we can get more familiar with it.

  • November 5, 2012 at 9:35 am
    Permalink

    For first timers, this is one of the articles to read. The SQL language can be difficult to grasp if you do not learn the fundamentals first. I agree with you that it is different to update a database without using the SQL. After learning more about SQL, I believe that we understand more into depth of database management.

Comments are closed.