Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts

Tuesday, February 9, 2016

B5 - Group B - Hatim Amiji

SQL stands for Structured Query Language, is a special purpose programming language designed for managing data held in a relational database management system (RDBMS). It is used to create, modify, and retrieve and manipulate data from relational database management systems. In SQL, tables and query results are lists of rows: the same row may occur multiple times, and the order of rows can be employed in queries.  SQL is used by most large scale databases to facilitate user and administrator interactions.  Many computer programs need to store and retrieve data.  Instead of implementing their own system of storing and retrieving the data, SQL systems can be used.

SQL works similarly to how an excel spreadsheet is set up; it looks at data in terms of tables.  Within these tables, SQL allows the user to place data, read data, change data, and remove data from these tables. SQL is a natural language for data analysis i.e. the concept of SQL is underpinned by the relational algebra therefore creating a consistent network for organizing and manipulating sets of data. SQL is a productive language for writing queries i.e. SQL engines have multiple ways to execute a query, but the developer does not need to understand any of the underlying database processing techniques. The developer simply specifies the desired set of data using projections (SELECT) and filters (WHERE). SQL engine has a lot of flexibility in how to optimize any given query hence shields the developer from the complexities of the underlying query techniques. In general, SQL provides a robust framework that adapts to new database management requirements.


Overall, SQL is important because it is the most popular language for defining relational database models, which have been the standard in the data industry for roughly the past four decades. Relational databases, as opposed to hierarchical databases, are composed of tables for which the creator explicitly defines the links or relationships. For hierarchical databases, every segment is already implicitly defined in a hierarchical path. The main advantage of relational databases is that they do not limit the user to a strict hierarchy of data and allow the programmer more liberty in regards to defining how the information is joined. As a result, they are more desirable in instances that demand flexible data structures. It is also relatively simple to edit and manipulate those structures.

Citations:

1. http://ezinearticles.com/?What-Is-SQL-and-Why-It-Is-Important?&id=6909544
2. http://www.thesitewizard.com/faqs/what-is-mysql-database.shtml


Comments:

Mohammed,

Your article was an interesting read. Seems like I underestimated the use of databases in the construction industry and its importance. Database can play an important role in the BIM world i.e. contractors, architects and engineering are working on the same model hence sharing big data in one platform thus the creation of databases can improve data organization and accessibility in order to ensure smooth/efficient workflow.

http://ae-510-ay15-16.blogspot.com/2016/02/b5-mohammed-alqallaf-group-e.html?showComment=1455058585410#c7466918960644081852


Cathlene,

I have never worked with SQL before but by reading your blog, I can imagine how such programming language can be used to obtain specific family sets from a big REVIT family database. Also creation of new family sets can be organized and manipulated to ease of use during extraction by other parties such as contractors, architects and structural engineers who are working on the same platform.


http://ae-510-ay15-16.blogspot.com/2016/02/b5-sql-farnelli.html?showComment=1455059530903#c56486159632581299

B5 - Group B - Zabiega

Structured Query Language (SQL) is one of the reasons we have the World Wide Web as it is responsible for querying and editing information that is stored on databases around the world that manage the system. SQL has been around since the 70’s but now is far more flexible to users  with its capability of supporting distributed databases, which means computers are networked and connected at all times. This greatly improves processes strength and allows for new functionality such as support for XML, triggers, regular expression matching, recursive queries and standardized sequences.
SQL is based on many different elements that can handle all necessary language commands; Clauses, expressions, predicates, queries and statements make up these elements. This enables SQL to retrieve data, update/insert/delete records from databases, create new databases and can set permissions in those databases. These commands can be summed up as: Select, Insert, Delete, Create and Drop. These commands can essentially enable the user to do anything to databases.
In the end, SQL is a very useful and helpful program to sort, find, view and edit information stored in databases all around the world.

Sources:

http://www.sqlcourse.com/intro.html

Comments:
http://ae-510-ay15-16.blogspot.com/2016/02/b5-group-b-shields.html?showComment=1455054859938#c5669809592686519000
http://ae-510-ay15-16.blogspot.com/2016/02/sql-what-is-it-and-why-important-as.html?showComment=1455054995412#c4910510389648974239

Gary Reiff - B5 - Group A

A database can be described as relational when it has been design to conform, or mostly conform to a set of practices known as the rules of normalization.  In order to understand relational database, the basics of a database need to be know first.  A database is typically constructed in two different stages.  The first stage is creating a logical data model.  A logical data model allow you to lay out the design and organization of the database.  The second stage is the creation of the physical data model.  The physical data model sets up the parts of the database visible to users, such as columns and tables.  In fact, relational databases story highly structured tables in columns of specific types and many rows of the same kind of information.  This is why the organization, and really the logical data model part of a relational database is so important.

Now that you know a little about databases, it’s time to discuss some terminology specific to relational databases.  The first relational database term I am going to discuss is entity.  An entity stores information in a database regarding something of interest in the real world, such as departments within an organization.  Next, an attribute represents information regarding an object that will be tracked, such as the birth date or social security number of an employee.  One last crucial concept within relational databases is a primary key.  A primary key identifies a specific instance or object of an entity, meaning no two instances or objects can have the same primary key.  A great example of a primary key in relational databases are ID numbers, such as the IP Address of a computer.

One popular language used for querying relational databases is SQL.  SQL can be used in many different ways for querying relational databases.  For instance, one use of SQL is for read-only operations, while other times it is used for read/write operations.  This way, only certain people can make changes to the database at certain times.

Lastly, relational databases should not get confused with graph databases, although they can be very useful for graph databases.  As neo4J states, “relationships are first-class citizens of the graph data model, unlike other database management systems, which require us to infer connections between entities using special properties such as foreign keys, or out-of-band processing like map-reduce.  In other words, relational databases are like the stepping stone for graph databases.  Some people even view graph databases as an evolution of relational databases. 

References



Comments
1.) Janet Tran's Comment
2.) Laura Worley's Comment

Monday, February 8, 2016

B5 - SQL - Farnelli

Databases are meant to allow users to efficiently access the data stored in them. SQL is the language behind how information is accessed in many databases, and is important because of how widespread its use is and how it can be integrated into a user’s experience. Unlike other types of data storage which involve nested items and data trees, SQL primarily locates data in tables. The fields of the tables can then be used to sort the data and access specific entries. Tables can be related to one another, such as a table of products and their attributes and another of suppliers and a third of product orders. One reason why so many people dislike SQL is because it is geared only toward this type of information storage, and is not readily changed or reinterpreted. However, the purpose of the language is fulfilled by how it is structured. For example, in the figure below from the Wikipedia page the purpose of the statement is to find the USA entry and increase the population by one. 
Figure of sample statement in SQL
To do this, the user first states what they are aiming to do (update information), where this update is located (in a country table), describe the change (increasing the population) and direct the change (only where the country name is USA). This seem to be a very roundabout way of making this update, but often these changes are made with a graphical user interface or more user-friendly dialogue box, with the coding dictated by what the user enters into the search box, etc. The way users interact with Revit’s databases are similarly structured, which I will discuss. The language was not necessarily written with coding in mind, but with efficiently accessing information from a large set of tables. This can be altered easily to tailor it to a different set of data by changing the parameters which are being referred to in the commands, though this may require work upfront. 

A database needs to be able to be created, read, updated, and deleted (CRUD). In Revit, we see examples of these capabilities in the assignment we completed last week. Most of the libraries come already created, but we were able to create families that added their attributes to the database. Every time you add an instance of this bookcase or of a wall, door or any other item you are reading from the stored information. Updating a piece is also very easy, as you can either edit a family file and reload it into the database or make a duplicate of a family or type and edit attributes. Deleting families is also relatively simple using the same “edit type” dialogue which allows you to duplicate a family. While these may seem like trivial tasks, they are important in the way the allow the information to be stored and accessed quickly. Even if only one person in a group knows how to create a family, most can place it in a model and view its dimensions, etc. By linking the information together, it also becomes more easy to find which piece you need. For example, in Revit you are given a ribbon which allows you to pick what sort of element you want to place (for example a wall). Then you can choose what specific type of wall you want to place based on the attributes (thickness, fire proofing, etc). By doing this you are accessing what Autodesk considers the most relevant aspects of the item before placing it. Without this built-in database query, you would have a much more confusing experience. Instead, the way you interact with the program guides you through the stored information in a way which is understandable. 

Sources:
http://www.thesitewizard.com/faqs/what-is-mysql-database.shtml

Comments:

Kai Waechter: I agree that SQL is important because it is generally the way in which a user interacts with a database. Data is very important and present in today's world, from databases of information about products to the database that holds all of the information of this blog. Having a unified (or at least mostly unified) language behind accessing this information is very important for interoperability and information exchange between databases.
Dianna Vogel: I agree that the coding behind SQL may seem primitive, and this is likely a holdover not only of the age of the language but also of the original use. When it was first invented the amount of data being used in a particular program was not nearly as large as what is used today, and the first uses were likely not web based. Today's use of databases to store so much more information is much more complex and contains many more categories and tables, which is likely why the language seems so cumbersome. The first databases were along the scale of a large Excel sheet, not a set of data which requires a set of servers to hold it as today's do.
 

B5 - SQL - Group B - Kai Waechter

               The standard programming language used for interacting with a database structure is known as the structured query language (SQL). It is considered the standard for both ANSI (American National Standards Institute) and ISO (International Standard Organization) meaning it is used worldwide for all databases [1].
               In the late 1970s, the premise for SQL was developed using relational models as its basis. In 1979, Relational Software, Inc. it was introduced as the first commercially available application of SQL.  In 1987 it was established as the worldwide standard and has remained such since then. Over time it has been continually revised to include various amounts of additional features.
               Since its creation, SQL has adapted in several substantial ways from its foundation of relational models and tuple calculus. In the older (theoretical) model, a table was treated as a set of tuples. In the revised version of SQL, tables and query results are considered lists of rows. Rows can occur multiple times, and the order of any row can be employed in queries (the basis if the programming language).
               One limitation with the language is that one set of code may not be entirely transferrable from one database to another without some sort of adjustment. Despite this it has a number of benefits which make it useful in managing databases. Most operations in SQL are handled through the use of programming elements. One such element is queries.
Queries are one of the core applications of SQL and allow the user to do a number of operations within the database. These includes things such as selecting, inserting, updating, and finding the location of data. It also includes a programming interface for the user [2].
Other elements of SQL include clauses, expressions, predicates, and statements. Clauses are constituent components of statements and queries. Expressions are used to produce either scalar values or tables made of columns and rows of data. Predicates are used to specify conditions which can then be evaluated in SQL. These can be used to limit the effects of statements and queries and effect the program flow.
What makes SQL so important is that it is established as the standard for all programming language within a database, thus being the prominent way to interact with one. Knowing how to best implement this language is fundamental for any sort of database management, an important skill to have in a world driven by data.

Sources:
Comments:

B5 - SQL - Mark Lodato

SQL stands for Structured Query Language. It is the language for relational database management systems, or RDBMS. SQL is used for tasks involving databases such as updating information, adding information, removing information, and linking information among many other tasks. SQL has been certified by the American National Standards Institute (ANSI) and the International Organization for Standardization (ISO) and has been adopted as the standard for database editing and organizational languages. Many different software companies such as Oracle and Microsoft have their own version of SQL in which to use for their own database needs. If a database is considered to be where all of the data is stored, then SQL is what allows that data to be interacted with. This is important because storing information in a table is incredibly easy. It is just rote data input and organization. However, what makes a database very useful is the ability to find, select, and filter that data from the database which is what SQL allows a user to do.

The main challenge present when using SQL is interoperability. An SQL developed for one database system may not be fully compatible if the same SQL would then be used for a different database system. This is mainly due to differences in programmer syntax and programmer style but there are several other reasons why these compatibility issues arise. Some of these reasons are the complexity and size of the SQL standard means that most developers and programmers do not support the entire standard, some guidelines are not specified in SQL standards relating to important functions which leaves these functions open to individual interpretation and implementation, and certain developers may be unwilling to include backwards compatibility in their program language, among others.

**Edit**
Comment 1: http://ae-510-ay15-16.blogspot.com/2016/02/b5-sql-group-b-kai-waechter.html

Comment 2: http://ae-510-ay15-16.blogspot.com/2016/02/b5-group-b-dianna-vogel.html

Sources:

Sunday, February 7, 2016

B5: Group B - Schroeder

SQL - What Is It and Why Important?

 As defined by sqlcourse.com, SQL stands for Structured Query Language and is used to communicate with a database. [1] This standard computer language is used to query, insert, update, and modify data in a relational database. As my fellow groupmates have already touched on the current application of SQL, I thought I would summarize its beginnings.

Dr. E.F. Codd published the paper titled “Relational Model of Data for Large Shared Data Banks", in June 1970 in the Association of Computer Machinery (ACM) journal, Communications of the ACM. [2] This paper became the cornerstone of SQL. The language, Structured English Query Language (SEQUEL) was first developed in the early 1970s at IBM. It wasn’t commercially released until 1979 by Relational Software Inc. which is now known as Oracle Corporation. This year is also when the name was shortened from SEQUEL to SQL. Since then, SQL has been set as the definitive model for RDBMS (Relational Database Management System). Oracle participates actively in the SQL standards committees which are spearheaded by two main organizations: American National Standards Institute (ANSI) and the International Standards Organization (ISO).

So how does SQL work? It is a data sublanguage that translates to a relational database by processing sets of data rather than individual units. All SQL statements use the optimizer, a part of Oracle Database that determines the most efficient means of accessing the specified data. [2] SQL unifies all the tasks of querying data, controlling access to database, and updating rows in a table all through one consistent language.

In the past few years, Oracle has created an Oracle Database SQL engine which they are constantly evolving to meeting growing demands of database applications. One recent addition is the inclusion of LOBs. LOBs or large objects can now be handled by the Oracle SQL engine which is no small task as a single LOB can be up to 128 terabytes. Another important development is the built-in aggregate and analytical function which facilitates access to data in data warehouses and data marts.
In the industry, SQL has many applications. One of which is searching through a list of all the employees for a company. Using the example below [2], you can simultaneously search through thousands of employees by hire date and salary.


Overall, SQL is an effective tool for relational database management.



References:
[1] http://www.sqlcourse.com/intro.html  
[2] https://web.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/intro002.htm  
[3] https://www.techopedia.com/definition/1245/structured-query-language-sql  
[4] https://www.augi.com/library/making-sense-of-data-interoperability-in-the-bim-world

EDIT: Comments left on Bryan's and Laura's original posts!

Saturday, February 6, 2016

B5, Group B - Palma

SQL stands for “Structured Query Language”, and is a method of communication with a database1. According to ANSI, SQL is the typical method of communicating with relational database management systems. A relational database management system, or RDBMS, is a database which allows you to create and maintain information in a table format, where rows, columns, or entries can have some relation or dependency on one another. Some more well-known RDBMS are Oracle, IBM’s DB2, and Microsoft’s SQL server2.

First about the reason for SQL; originally, DBMS were used primarily by programmers in order to maintain and create data. In order to create a system which output some answer (for example, a total revenue or production capacity), a programmer would have to develop new software that often was not worth the trouble.

SQL is one of many “query languages” developed to solve this problem. When a user is requesting something from a database, this is called a “query”. As such, query languages were developed in order to allow the user to efficiently request from the database in a customized manner. For SQL, database management systems follow a particular process at the creation of a query. The system must first break up the input statement, checking syntax, then validates the statement, ensuring all relevant tables or entries exist. The system then creates an access plan to retrieve the data, and optimizes this plan. Once optimized, the system performs the access plan to retrieve the answer for the request3.

This process is used on the data retrieval side of SQL. As mentioned before, however, SQL is also used for the creation and updating of databases. SQL has standard commands, such as “Select”, “Insert”, “Update”, “Delete”, “Create”, and “Drop” that allow the user management for most purposes when working with the database.

“Embedded SQL” is the first technique for sending SQL statements to a DBMS. Here, SQL is used as a sublanguage, hosted by some other programming language which contains variables or statements3. Furthermore, embedded SQL can be broken up into static and dynamic SQL. Static SQL queries consist of requests that do not change when the database is accessed4. Conversely, dynamic SQL queries are a flexible form that allow for queries where data access cannot be pre-determined. For example, if the database is located elsewhere, then although the request can be entered, there is no way of validating the statement, as mentioned in the process before5.


References

5 - https://msdn.microsoft.com/en-us/library/ms709342(v=vs.85).aspx




Comment to Dianna Vogel

Nice part about the importance of SQL. As mentioned, SQL is relatively old, and compared to other programming languages, has been around for quite some time. That being said, I don't see it disappearing any time soon. SQL is an efficient and logical method for working with databases. Even with newer programs, optimal languages for this form of work will likely always have some basis from SQL; it's probably not going away unless databases do, which certainly won't happen.

Comment to Bryan Cummings

I liked that you related this back to BIM. Take Revit for example (since I know it fairly well). The amount of libraries and commands that are likely based of something like this, or very similar, is huge. You mentioned how most systems have their own proprietary languages built in to use with SQL; I also discussed this a bit in my post, where systems use embedded SQL.
 

B5, Group B - Cummings



SQL stands for Structured Query Language, and it is the standard language used specified by ANSI to communicate with a database, specifically a relational database.  A relational database, as a digital relational model, organizes data into tables which represent relations between the column and row vectors.  SQL is used to perform tasks on the database, which can include database updates, modification, and data retrieval [1].  These transactions are made through SQL via language elements which include clauses (such as “update” or “set”, etc.), expressions (which are the arguments and can either be a vector or scalar), predicates (which specify evaluated conditions through logical statements, e.g. true/false/equal/etc,), queries (which retrieves the data based on the previously established criteria—often makes use of the “select” statement). [2]


The following depicts a simple SQL query, taken from Wikipedia.  Here, the “Select” query is to retrieve points from the “Book” vector (expression) whose corresponding prices (from a “price” vector) are greater than 100.
SQL of this type is standard for overall database communication.  However, most systems also have their own proprietary languages added on which they can use on their own internal system. 


A significance of SQL is that is the operator behind nearly every movement on a website [3].  Websites are not much more than a series of databases, and interaction between different parts of the site require at the least communication and exchange to the databases (for actions such as switching from one page to another) and sometimes modification of the database (which can happen during online purchase) [4].  All of these interactions are based on queries in SQL.  It is such a universal language that many other tools have been built off it used for other application.  In relation to the scope of this course, the importance of SQL is that most—if not probably all—BIM software is built upon relational database, as described above.  Therefore, SQL is crucial part and limiting factor of BIM’s functionality.

[2]       ANSI/ISO/IEC International Standard (IS). Database Language SQL—Part 2: Foundation (SQL/Foundation). 1999.

Friday, February 5, 2016

B5: Group B - Dianna Vogel

               SQL is the ‘Structured Query Language’ that is key for interacting with databases. [1] SQL is used to communicate with a database and relay specific commands. These commands can be used to update the information contained within the database, or draw certain information out. [2] The commands that are the life and blood of SQL are called ‘queries’. These queries start with a few basic functions, but when combined and expanded upon they become extremely comprehensive. A few of the most common commands accomplished with queries are: insert, select, create, etc… All databases start with a table and give the structure that queries need to work. Queries function based on codes, from simple to complex. A simple code would be to select a column within the desired table (as seen in Figure 1).
Figure 1. Sample Code for Selecting a Column
               This code could be expanded to include conditional statements in the where clause [1] to specify if the desired value is equal to, greater than, less than, etc. the referenced value. Once these skills have been mastered the same format can be used to create a new table, insert something into a table, manage records, or any number of things. The functions and code used to query within a database is the same platform of code used in other programs such as Matlab.

               SQL is important due to a number of reasons. One, it is one of the oldest programming languages. Many other programming languages have been modeled off of SQL and expanded upon. [3] Thus, it is not the easiest code to learn or use, because it seems almost primitive by today’s standards, but it is still incredibly useful. Likewise, due to SQL having so many other tools built off of it, it has almost become a universal language. SQLite is an SQL database that is used on Androids and IPhones, with some applications directly enabling its database. The universality of SQL creates the ability to code one program that will run on computers, phones, and anything else running SQL or SQLite. This type of interoperability is an idea fantasized by other software’s, like BIM.  Thus, the importance of SQL is its ability to transcend barriers and provide a platform to interact with almost any database

Citations
[3] http://sql.learncodethehardway.org/book/introduction.html

Comments

http://ae-510-ay15-16.blogspot.com/2016/02/b5-group-b-cummings.html
Comment to Bryan,

I agree that SQL is the platform upon which all websites have been built. This statement extends to the majority of programs, desktops, phones, and a full list of modern items. In relation to BIM, it is not surprising that SQL supplies the communication between the massive databases upon which programs like Revit run. The query command function allows the user to interact with different parts of Revit, including families. The family database is one of the most obvious databases within Revit. This database can be added to, selected from, and modified. Thus, I agree that SQL is a major part of BIM’s function, but I do not understand how it is a limiting factor. I believe BIM’s limiting factors come from other avenues.

http://ae-510-ay15-16.blogspot.com/2016/02/sql-stands-for-structured-query.html
Comment to Alex,

I like how you went into depth on how the queries work. The syntax is obviously important when coding a command for a database. If one comma, period, or letter is out of place the correct result will not come out of the query. This can make the process of querying complex and confusing to many people, which is why the user interface has been updated and reformatted in the programs built off of SQL. While these newer programs may be more user friendly, the importance of SQL has not faded. Without this initial language databases wouldn’t have made the progress they have made today.