CSUMB 363 - Week 3
Author
Michael SorensenDate Published

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) ?
A SQL view is like a table but, it is built upon a query using existing data rather than initialized with nothing like a table. It's effectively a stored query. But, that means it behaves slightly differently ESPECIALLY if you have some complex joins in that query.
I think it should be used specifically as read-only if at all.
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.
To be entirely honest, being asked to compare SQL to Java is hilarious. These tools follow similar logic structures but, their use cases and additional features are completely different.
This class has shown me that while you can re-create SQL behavior in Java you probably shouldn't.
I am sad that our study of SQL is over though. Mostly because, I feel like we stopped short of actually embedding SQL queries inside of a java application which is more real-world than whatever this custom Java query framework we created is.
Comments
Join the conversation! Login to reply to comments