Skip to content

Tri 2: Tech Talk Week 4: Binary Search, Calling Procedures, and Developing Procedures

suneelanaidu edited this page May 11, 2022 · 1 revision

Vocabulary, Pre-requisite, References:

Topics and Purpose

To assist in understanding search and procedures (Big Idea 3.11, 3.12, 3.13), Tech Talk 4 will now be shared with all. This talk was formerly shared with Technical Officers. Between Technica1 Officers and Teachers it is time to learn this material and to have a Resolute mindset in mastering this material. TT4 is focused on Database CRUD and Search and is a provided example in this CSP course project.

  1. Calling and Developing Python Class, Procedures (aka def) and using Objects will be illustrated in the Database definition, queries, and search. Additionally, each Student needs to understand that a database is a structure that qualifies for one of the College Board Create Task requirements (i.e, List).
  2. HTML forms and action allow user input to be passed to Python control functions (aka def). Python control functions will pass user input to Database Model function. Database model functions will return values to Python control functions, which then reloads HTML forms with data updates as parameters.
  3. JavaScript Procedures (aka function) will enable passing user inputs to search procedures asynchronously through fetch, also JavaScript will receive return values (JSON) as a result.
  4. SQLAlchemy framework provides standards for Developing a Database, this is by developing a Class and multiple procedures to interact with the Database.
  5. SQL Query with "Order By" enables data to be returned in an ordered lists. This list will enable us to test a future procedure which performs a binary search

Code Table

The CRUD Blueprint is a collection of Python and HTML files. These files are a used to support Frontend (HTML, JavaScript) and Backend (Python, SQLALchemy). Together these files allow user to store and retrieve data.

CRUD Model View 1 View 2 Control Query
Blueprint Database CRUD Actions Search Routes/HTML SQL

Challenges

  1. Spend some time in JavaScript writing code that formats the results of Search, utilize the other columns in the output.
  2. Spend some time learning Procedures, Parameters, and Return values by working in the sql.py file. Try to write native SQL select statements in procedures (def) that provide similar inputs (parameters) and outputs (return values) as provided SQL alchemy functions.
  3. Develop a procedure that Reorders/Sorts the main listing of the database when clicking on the column heading. This would require engineer to develop and call procedures that reorder the data.
  4. Look at Bootstrap Navbars, consider adding Search Navbar to your site. Utilize the provided database and functionality to get Search working. As more advanced step, produce Database search results that can be used to Navigate elsewhere in the site.
  5. Ultimately you will need to search a single record in a sorted list. This would be with a binary algorithm.
Clone this wiki locally