Question: Write a PostgreSQL script that contains the following elements. 1) A table ALBUMS of your own, as well as a word index table that contains

Write a PostgreSQL script that contains the following elements.

1) A table ALBUMS of your own, as well as a word index table that contains album id and individual words in a title. Be careful not to forget the necessary constraints.

2) A function that sanitizes a title, removing punctuation and turning everything to the same case (your choice: upper or lower). Youll probably want to use the translate() PostgreSQL function in your solution, and the following list for punctuation: #@&"''(!)-_$*%<>[{]},?;.:/=+

3) A function that takes two parameters, an album id and a title, and populates the index table containing album id and words (after sanitizing the title). Your function will ignore one-letter words.

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

Students Have Also Explored These Related Databases Questions!