Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The language is SQL You are creating a Twitter clone and need to design your database from scratch based on observing the kinds of details

The language is SQL

You are creating a Twitter clone and need to design your database from scratch based on observing the kinds of details Twitter stores and how it fits together. Your table schema should support user profiles, tweeting, retweeting, liking, and replying.

For this exercise you will not be provided with the specific data that needs to be stored, it will be up to you to work out what data you need and how best to store it.

To simplify our needs, you can assume that:

Anywhere you want to allow images will be stored as just an image file path (i.e. just make something up like '/user_pics/username.jpg' and store that in the database).

Replies are all stored as replies to the original tweet, never as replies to another reply.

Your task is to:

Determine Map out your tables using ER Diagrams with the appropriate relationship cardinality markers.

Use your diagram to create the tables, making sure to define the foreign keys.

Populate your database so that you have:

2 users

5 tweets

3 replies

5 retweets

10 likes

Then write queries to display:

All tweets, from newest to oldest.

All tweets from today.

Retweets of a particular tweet.

The number of likes for a particular tweet.

The total number of replies per user for each tweet (i.e. for each tweet, how many replies did each person who responded send).

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

Describe the patterns of business communication.

Answered: 1 week ago

Question

3. Provide two explanations for the effects of mass media

Answered: 1 week ago