Skip to main content
Week 3 - SQL and Java
- 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 similar to a table in the way that it's displayed. View tables don't change the database 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. SQL uses a lot of the same data types as other programming languages but they have different names. For example, in SQL we would use decimal but in java we would use float or double. They each mean different things but all represent fractional numbers. SQL also doesn't appear to use any loops to read through an entire table. Where are in Java, if we want to look at the values of a table, there is no other option than to use a loop.
Comments
Post a Comment