{"id":112,"date":"2021-05-26T06:32:35","date_gmt":"2021-05-26T06:32:35","guid":{"rendered":"http:\/\/jonathanlimpus.com\/wordpress\/?p=112"},"modified":"2021-05-26T06:32:35","modified_gmt":"2021-05-26T06:32:35","slug":"cst-363-week-4-learning-journal","status":"publish","type":"post","link":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/2021\/05\/26\/cst-363-week-4-learning-journal\/","title":{"rendered":"CST 363 &#8211; Week 4 Learning Journal"},"content":{"rendered":"\n<h4><em>When coding a Java program that will perform a SELECT statement that return multiple rows, what are the steps needed? The first is to make a connection to the database and the last is close the connection. What are the other steps?<\/em><\/h4>\n\n\n\n<p>Outside of these steps, you must also create a Prepared Statement, optionally insert strings using the &#8216;?&#8217; and PreparedStatement.setString() method, and then exectute using PreparedStatement.executeQuery.<\/p>\n\n\n\n<h4><em>What is a parameterized SQL statement?<\/em><\/h4>\n\n\n\n<p>A parameterized SQL statement is a query that uses Java or other parameters and methods to prepare a SQL statement, instead of using a literal string.<\/p>\n\n\n\n<h4><em>Do a google search for &#8220;SQL injection attack&#8221;. What is an &#8220;injection attack&#8221; and how do parameterized statements help to prevent such security attacks?<\/em><\/h4>\n\n\n\n<p>Injection attacks are performed when a hacker directly executes SQL code from some sort of front-end application. Parameterized statements prevent this by requiring input to be of a certain data type, thereby preventing a hacker from inputting malicious code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When coding a Java program that will perform a SELECT statement that return multiple rows, what are the steps needed? The first is to make a connection to the database and the last is close the connection. What are the other steps? Outside of these steps, you must also create a Prepared Statement, optionally insert &#8230; <a title=\"CST 363 &#8211; Week 4 Learning Journal\" class=\"read-more\" href=\"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/2021\/05\/26\/cst-363-week-4-learning-journal\/\" aria-label=\"More on CST 363 &#8211; Week 4 Learning Journal\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,7],"tags":[],"_links":{"self":[{"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/112"}],"collection":[{"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":1,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":113,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/112\/revisions\/113"}],"wp:attachment":[{"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/jonathanlimpus.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}