final exam SR Flashcards
What are the four types of queries we can perform on data?
SELECT, INSERT, UPDATE, DELETE
How do databases help decrease our workload as programmers? In other words, what can databases do to make it so we have to write less code?
Databases allow us to filter, sort, and group data with far less code
How are databases better than using text files?
Databases allow for random access of data
Which line is it important we always have in our queries, especially with DELETE and
UPDATE queries?
We should always have a WHERE clause
Explain conceptually (not programmatically) how two tables can be stitched together to
create more complex result sets.
We can use the primary key / foreign key relationship between two tables to specify how the tables interrelate
What happens if we do not specify how two tables relate to each other?
The result is a cartesian product
How does Maven help us make our code portable to other programmers?
Maven gets the dependencies for us meaning anyone who uses our project, will have the correct items to run the program
What are the three things we need to tell Maven about a dependency? What are the values for these items in the case of the SQLite JDBC?
Group ID - org.xerial
artifact ID - sqlite-jdbc
Version - 3.39.4.0
What is our groupID when creating Maven projects?
edu.psu.bd.cs.<username></username>
Why is the JDBC important?
The JDBC allows java to talk to the database
Why do we have to close ResultSet objects?
Closing the ResultSet releases a lock on the data
Besides the connection what do we need to create in order to run a query against the
database?
Prepared statement()
What is Spring Framework?
Spring Framework is a tool that helps do the “heavy lifting” when we want to create a web application
Why do we like using Maven when working with Spring?
Spring has numerous dependencies and having a tool to manage these dependencies means less work for us as programmers
What benefits does Spring provide when trying to create methods that can be run over the internet?
- Spring creates a Tomcat sever to run our application
- Spring handles I/O conversion to and from bytes
- Spring provides a mechanism to connect methods with URL’s and HTTP Verbs