Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please complete part 1 question 1. use mysqlworkbench. and also please label your code by file name and extension (dont just upload all code together)

please complete part 1 question 1. use mysqlworkbench. and also please label your code by file name and extension (dont just upload all code together) thanks image text in transcribed
image text in transcribed
Description 1. Consider the design of a database for a web site that allow people to share sunset images. Each image is identified by an image ID that will be generated automatically by the system, the URL of the image, and a list of tags for the image (each tag is a low-case word). a description of the image, and a timestamp recording when the image is posted by a user. Only registered users can post, share, and view images at the website. Each registered user is identified by a unique username that must be an email, a password, a first name, a last name, the gender, and his/her birthday. After a user sign into the system, the user will see his Feed Page. In that page, the user can post one sunset image after another, which will be automatically displayed one after another in reverse-chronological order in the Feed Page. Therefore, the last posted image will be displayed first. A user can also follow other users by browsing or searching the Community Page. The Profile Page of a user will display all the information of a user except the password, and the number of followers and the number followings, respectively (see the Rumble app as an example). In addition, the followers" and "followings" are two links that link to the corresponding users, that allow one to follow or unfollow users. The "follow" or "unfollow" button will be shown depending on which button is suitable for that corresponding user. If user A follows user B, then after A signs into the system. A will see his/her Feed Page, which displays all the images posted by A as well as by B, ordered in reverse-chronological order. If A follows multiple users, then all the images posted by the followings will be displayed in A's Feed Page. The Community Page has a search field following by a list of all the users in the system, which is ordered alphabetically by last names and first names. The search field allows one to search users either by first name, or by last name, or by both. A user can give a like to each posted image including an image posted by herself/himself, but not more than one like. A user can also cancel his "like" action if the user changes mind. A user can also insert/delete/modify at most one comment for each image. On each day, a user can post at most five images. On each day, a user can give at most 3 likes. The system has a distinguished user called "root" whose username is root (this is the only username that is not an email). 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 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 purposes. Part 1 Use Java and SQL, implement the following functionality: 1. The website root user has a username root and password "pass 1234" (Note this is a different root - it is for your website, not a user for the underlying MySQL database system). For the root user, implement a button called "Initialize Database. This button will only be displayed after the root user signed in successfully. Each time the root user clicks the Initialize Database" button, the following three things will happen: 1) all existing tables, if any, will be dropped; 2) all necessary tables will be created or recreated automatically; and 3) each table will be inserted with at least 10 realistic tuples (which can be hard-coded in your Java program), so that each query below will return some meaningful results. This button will need to be reimplemented each time you change the design of your database, for example, in part 2 and part 3 of the project

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

More Books

Students also viewed these Databases questions

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago