1. SQL Views
A view is like a pseudo table made from a query. You can SELECT
from it like a real table, but it doesn’t store data itself. It can’t have primary keys, and sometimes you can’t INSERT
, UPDATE
, or DELETE
from it if it’s too complex (like if it uses joins or grouping).
2. SQL vs Java
SQL is for talking to databases. Java is for building programs.
Both use conditions (WHERE
in SQL, if
in Java) and return data (SELECT
vs return
).
Java gives more control and runs step-by-step. SQL just says what data you want, and it figures it out.