Chapter Six Flashcards
(99 cards)
What is the purpose of join tables in SQL?
To retrieve data from one or more tables
What does a SELECT query return?
A table
What is a cross join?
A join that returns all combinations of rows from the joined tables
How do you perform a cross join in SQL?
SELECT * from DEMO_INSTRUCTOR CROSS JOIN DEMO_COURSE
What is the requirement for join compatibility between two tables?
There are no specific requirements on the number of rows, columns or matching columns
Can you cross join a table with itself?
Yes
What is the purpose of table name aliasing in the FROM clause?
To write more readable queries
What are subqueries in SQL?
Queries nested inside another query
What is a correlated subquery?
A subquery that references a table (alias) from the outer query
What is a derived table?
A subquery used in the FROM clause
Why should one use subqueries?
For performance reasons and clarity of logic
What is the compatibility criteria for using UNION in SQL?
The number of columns and their data types must match
What is the significance of knowing how many result rows to expect in a join query?
It helps in understanding the output of the query
What can the operand for a FROM clause be?
A SELECT query
What are the two types of subqueries mentioned?
- Outer Queries
- Inner Queries
What is a non-equi join?
A join that does not require equality between columns
True or False: A SELECT statement can return data from multiple tables.
True
What is Middleware?
Software that allows an application to interoperate with other software without requiring the user to understand and code low-level operations.
Middleware facilitates communication and data management for distributed applications.
What does API stand for?
Application Program Interface.
It consists of routines that an application uses to direct the performance of procedures by the computer’s operating system.
List the common database APIs.
- ODBC
- ADO.NET
- JDBC
What are the steps for using databases via Middleware APIs?
- Identify and register a database driver
- Open a connection to a database
- Execute a query against the database
- Process the results of the query
- Repeat steps 3-4 as necessary
- Close the connection to the database
What is a fat client?
A client PC that processes presentation logic, extensive application and business rules logic, and many DBMS functions.
Fat clients often require more resources and capabilities than thin clients.
What is a thin client?
An application where the client PC primarily provides the user interfaces and some application processing, usually with no or limited local data storage.
What are the advantages of three-tier architectures?
- Scalability
- Technological flexibility
- Long-term cost reduction
- Better match of systems to business needs
- Improved customer service
- Competitive advantage
- Reduced risk