CST 363 Week 3 Journal Entry

  1. What is an SQL view.  How is it similar to a table? In what ways is it different (think about primary keys,  insert, update, delete operations) ?

1. SQL View is a virtual table made of columns from tables. It is similar to a table since they both have data types in columns, and they both can use queries and joins. The difference is that the View stores the query, not the real data. A view also can not be indexed or have primary keys, insert/updaet/deletes do not work all the time. The pro of a view is that is conserves minimal space compared to a table due to not storing data.


2.We have completed our study of SQL for this course.  This is not to imply that we have studied everything in the language.  There are many specialized features such as calculating rolling averages, query of spatial data (data with latitude and longitude) coordinates, and more. But take a minute to think about how SQL compares to other programming languages such as Java.  What features are similar , and which are present in one language but not in the other?  For example,  Java has conditional if statements which are similar to SQL WHERE predicates,  the SELECT clause is similar to a RETURN statement in that it specifies what data or expression values are to be returned in the query result (although it is strange that a statement should specify the RETURN as the first part of a SELECT.

2. Some similarities between SQL and Java is the WHERE/HAVING queries are similar to if/else statement, switches and ternary operator in Java, both of which have conditions based on logic. ORDER is similar to Java sort methods in that they sort the data depending on the case, and then SELECT queries are like methods themselves as they both return what they want from the operation.

Comments

Popular posts from this blog

Week 2 Journal Post

CST 334 Week 7

Week 1: About CSUMB and Online Learning Strategies