Thursday, February 9, 2017

Assignment B5 - Group B - Maria Raggousis


SQL - What is it & why is it important?

Introduction:

SQL is an acronym for Structured Query Language. What this means is that there exists databases through computer software and the way that they both store information and retrieve information is done with the help of this formatting and methodology. It is basically a very basic programming language similar to HTML in which the text transforms your data in to a database system. It is a standard method according to American National Standards Institute (ANSI) and International Organization for Standards (ISO) and is used by many database computer software [1]. The two that I am most familiar with using is Microsoft Access (which is similar to Excel) and Oracle, a more powerful database system. 

What is it?

To reiterate, SQL is a simple programming language. It uses words and symbols to store and retrieve information in the computer in an efficient and never changing way. When I picture a database, I picture an Excel file where basically you have your table and you have your columns and rows within that table and you have your data associated with each one. An SQL search allows the user to find specific information in that database with their inputs. 

For example, an SQL "Select" statement allows the user to "Select" columns, "From" any table or multiple tables and finally set a criteria, "Where" you insert the criteria for the column [2]. The reference from Indiana University Knowledge Base includes examples of what that statement will look like and how the outcome of sample data may look. 

In my opinion, this third reference from Microsoft has the better example of how it works and what different search entries would do to the results [3]. For example, imagine you have a table called Employees and it contains a great deal of information about each employee - and you could have hundreds of employees - all across the globe! To start, you may want to view everything - so you might write: 

SELECT * FROM Employees 

which translates to select all columns from the table Employees. Once you realize that is way too much information, you might want to get much more detailed about what information you want it to retrieve. Maybe now I want:

SELECT EmployeeID, LastName, FirstName, City FROM Employees

Now I am limiting my new table to contain four columns from the original who knows how many. Finally, I realize I only want a certain Office Location employee list - so the final query search becomes: 

SELECT EmployeeID, FirstName, LastName, City FROM Employees WHERE City = 'London'

Finally, we see the specific information we wanted to see without sorting or filtering or typing strange formulas that add and count and multiply in Excel - we basically wrote out in words what we were looking for! 

[3]

Why is it important?

If this system were not important, we would not be still using it in almost every industry. This system has no barriers and it allows anybody from a startup company to a complex data center to store their information and have it appear at your fingertips. It is not just information like names and addresses, which I believe it lends itself very useful to, but it is also things like in stores for barcodes, numbers, prices, quantities, and so forth. Particularly in the Architectural, Engineering, and Construction industry we find databases appear in our Building Information Modeling. All this information gets stored and retrieved as we need it and Revit is doing it all the time. Just like our speakers mentioned, in the construction industry with object schedules and cost estimates - this becomes a complex database that can store the measurements of objects, the price per unit, and total prices. In physical equipment it can store specifications like model number, prices, and detailed specifications for the unit. 

The beautiful thing about databases is that they can accept anything to store, numbers, letters, or both. As long as the database is set up correctly, which is honestly the key here, then the SQL process becomes simpler and faster. In my co-op experience, I did not know how to use SQL and I attempted to use Microsoft Access. In the end I exported the database to Excel and used formulas within formulas just to get the information I wanted. I had nested If Statements and Iterative Loops that would make Excel crash because of the massive amount of data I was looking at (Crash Data). Most of it was things I weren't interested in and they were clouding up  my view, unable to get the statistics I needed, just because I couldn't understand how to use Microsoft Access. That is a personal anecdote that truly motivates me to say SQL is important because without it, you lose productivity, efficiency, and organization... trust me, I know. 

Sources:

[1] "SQLCourse - Lesson 1: What is SQL?", Sqlcourse.com, 2017.

[2] "What is SQL, and what are some example statements for retrievingdata from a table?", Indiana University Knowledge Base, 2017.

[3] J. Goldstein, "Writing SQL Queries: Let's Start with the Basics", Microsoft TechNet, 2005.

Comments on Other Blogs:

Drew Hovey: I am pretty glad I read your post because as soon as I heard "relational database" my eyes sort of glazed over. Anything that has these computer algorithms makes my head spin but I thought you presented the material in a way that was clear and easy for me to understand whether I wanted to or not. I didn't know that it worked in the three modes (1 to 1, 1 to many, or many to many). I think I could handle a one to one database because that feels like just a table, one column and one row, but as soon as the multiple relationships appear I guess it would be like even more columns of data that get populated from each other - relating one thing with many other columns or rows (or like your diagram which was not columns or rows). I think I would have to see a relational database in action to fully grasp the differences, however, because I still am unsure what it would look like in terms of the data.

Egla Qori: Since we had the same prompt - I wanted to check out what information you found that I missed - turns out a bunch! I was really looking for the commands and what else people use SQL for, like how to insert information in to the database but I kept finding tutorials for "Select" so I used that as my example and ran with it. I like the table you provided because it shows the flexibility and basically what types of commands you can insert in the select function. Another new thing I learned from your post was the sub-divisions in the language.

Maissoun Ksara: Reading your post will help me piece together what I didn't get from Drew's since it is the same topic. Your introductory quote helped me realize that maybe SQL and databases don't always lend themselves to a relational database the same way. Now that I think about it with the poet poem example, I could have used this in my co-op experience where I was having trouble getting multiple rows of data for the same "ID" in Excel. I had the same ID for the car crash but it had information about Vehicle 1 and Vehicle 2 but not only that, it had Passenger 1 & 2 for each vehicle involved - now I see a relational database would have been much cleaner than my Excel equations trying to call the data... Since you  mention the capabilities can be limiting with extensive amounts of data - I wonder what industries use the relational database the most?

2 comments:

  1. Maria,
    I liked your statement example from Microsoft, specifically how it started with a very basic SELECT statement and built on top of it to structure a more complex statement from the original. It really helped me contextualize what each of the parts of the complex statement meant and what their functions were. I also liked how you tied our SQL topic back into the AEC industry through BIM.

    ReplyDelete
  2. After reading Ronald’s post I was particularly interested in SQL, your post gave me a better understanding regarding the topic. The example you provided really helped with the understanding of the language and its connectivity with data

    ReplyDelete

Note: Only a member of this blog may post a comment.