CST 363 Week 6
Summarize what you have learned this week.
This week, I learned that programming language tends to be categorized between being imperative or declarative. In imperative language, the statement flows are controlled so they are executed in a specific order. On the other hand, declarative language lacks this controlled flow because the statement declares the desired result. Declarative language tends to be the choice for database queries due to the ease of programming and time to execute the queries. I also learned that SQL statements can be embedded in the host language of the program where it then gets translated by the pre-compiler. This will require that the programs are connected to a database prior to executing queries, which allows the database to be accessed. The same can be done vice versa, where the host language can be utilized in SQL statements when declared between 'BEGIN DECLARE SECTION' and 'END DECLARE SECTION'. As a result, it is possible to create database programs using other programs, such as Java. The important thing to remember is that Java does not support the use of cursors. Cursors are embedded SQL variables that helps identifies a row of a table. Rather, the data must be fetched with the help of the 'ResultSet' interface, which will return an object containing the query results.
With all this new knowledge, I learned how to connect my Java program with my database. This is exciting to me because at the start of this course, I thought use of databases are very helpful but I could not understand how it could be helpful when users are going to want an easy-to-navigate GUI. Now I have a much better understanding.
Comments
Post a Comment