Question: Consider the design of a database for a web site of jokes. Each joke is identified by a unique joke ID, a title, a description

Consider the design of a database for a web site of jokes. Each joke is identified by a unique joke ID, a title, a description of the joke, the date the joke is posted, and a list of tags (each tag is a single word in lower cases). Only registered users can post, read, comment on jokes. Each registered user is identified by a user ID, a password, a first name, a last name, an email, the gender, and his/her age. A user can give at most one review for each joke, and on a particular day, the user can post at most 5 jokes and 5 reviews. Meanwhile, a joke can have no or many reviews. The review given by a user provides a score of Excellent, Good, fair, or poor and then a short remark. A user can modify an existing review that she/he gave earlier. One special user called root is designated as the administrator user. The root user can ban any other user into a black list. Once banned, a user will not be able to login into the system unless he/she is unbanned from the blacklist subsequently. In addition, each user has two dynamic lists: my favorite friends and my favorite jokes, which can be modified by the user when necessary by insert, delete or update. For all parts of this project, your system must be web-based. Some simple GUI interfaces are required for each functionality. All functionality must be performed via the interface of your system, direct SQL statement execution via any tools (MySQL workbench) can only be used for debugging purporses. Part 1 Use Java and SQL, implement the following functionality:

1. Implement a button called Initialize Database. When a user clicks it, all necessary tables will be created (or recreated) automatically, with each table be populated with at least 10 tuples so that each query below will return some results. All students should use the database name sampledb, username john, and password pass1234.

2. Implement a user registration and login interface so that only a registered user can login into the system. The root user has a username root and password pass1234.

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!