Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) Once we delete a user, we should delete all tweets posted by that user. Implement this functionality using a SQL trigger. (b) Find all

image text in transcribed

(a) Once we delete a user, we should delete all tweets posted by that user. Implement this functionality using a SQL trigger.

(b) Find all users who read about iPhone 11 before its launch (i.e., before Nov. 3, 2019).

(c) Find all users (uname and city) who follow at least everyone that user Donald Trump follows.

Users (uname, city, street) - you may assume that uname is unique Follows (uname1, uname 2) - user with unamel follows user with uname2 Tweets (tid, t_tittle, t_text) - tweet with tid has title t_title & content t_text User Tweets (uname, tid, ts) - user uname posted a tweet with tid at time ts Tweet Tags (tid, tag) - tweet with tid has tag in its list of tags. we would like to extract some useful information from the database and we leave this job to our database expert (you!). Use MySql or Postgresql Users (uname, city, street) - you may assume that uname is unique Follows (uname1, uname 2) - user with unamel follows user with uname2 Tweets (tid, t_tittle, t_text) - tweet with tid has title t_title & content t_text User Tweets (uname, tid, ts) - user uname posted a tweet with tid at time ts Tweet Tags (tid, tag) - tweet with tid has tag in its list of tags. we would like to extract some useful information from the database and we leave this job to our database expert (you!). Use MySql or Postgresql

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_2

Step: 3

blur-text-image_3

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

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions