Question: Question 1 [a] code that executes a query to create a table WORDS with five columns: word_id - primary key chapter_num - the chapter number

Question 1

[a] code that executes a query to create a table WORDS with five columns:

  • word_id - primary key
  • chapter_num - the chapter number
  • verse_num - the verse number within a chapter (1 and following)
  • word_pos - the word's position within a verse (1 and following)
  • word - the word itself

[b] a program to iterate through the nested list of chapters and verses, parse each verse into words, and populate the table created in part [a]. It is recommended that you convert text to all upper- or lower-case so we don't encounter case-sensitivity issues in other questions.

Question 2

Suppose that each chapter and each verse also has a name that needs to be stored, in addition to the chapter and verse numbers.

[a] Redesign the schema (possibly using multiple tables) so that it is in 3NF. (SQL is not required.)

[b] Explain the requirements for 3NF and show that they are satisfied by your design in [a].

Question 3

[a]a MySQL functionmake_verse(c, v) that will reconstruct the sentence of chapter c, verse v, by concatenating the words of that verse in order with spaces between them. (It is understood that capitalization will be lost as a result of our approach in Question 1 part [b].)

Question 4

[a] Create an HTML form for manual entry of a row into the WORDS table as defined in Question 1, part [a]. (It is necessary only to create the form portion and not the entire HTML)

[b] Create a Flask/Python route/function to obtain the data from that form and insert it into the database.

Question 5

[a] Create a Flask/Python route/function that accepts a chapter and verse as parameters and will retrieve all data from WORDS for those parameters.

[b] Create an HTML table that uses Flask to display as a table the data retrieved in part [a]. (It is necessary only to create the table portion and not the entire HTML)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock