CST363 - Week 3
Went back on previous CS courses and updated their titles to their corresponding weeks, rather than the total week count of the program. The breaks in-between jumbled my numbers too much!
CST363 Week 3 - Learning Journal
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) ?SQL views are a bit like subclasses in Java, where they are mainly used to present only specific data to the user. Views can be created to restrict what information a user queries from a database, but without modifying any existing tables in the database. Views can also be used as a shorthand for complex queries, so they are not written over and over when they are needed.
Operating on views can be tricky, because restricting what data is available can have undesirable side effects. For example, inserting a primary key that exists in the base table but not the view itself will be prevented because the view will set the primary key to null.
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.
SQL functions more closely to set theory, compared to Java and other OOP languages. SQL focuses on storing and manipulating data in single actions, while Java can set up a procedure (like a loop) to continue performing a similar action repeatedly. They are most effective when used together.
Isopod Update: I saw a pink one in my pak chongs!! One step closer to the sakura/cherry blossom army.
Comments
Post a Comment