Answer to Question #242078 in Web Development for jai

Question #242078

Twitter

Twitter

Given an app.js file and a database file twitterClone.db consisting of five tables user, follower, tweet, reply, and like.


Write APIs to perform operations on the tables user, follower, tweet, reply, and like containing the following columns,


User Table


Column Type

user_id INTEGER

name TEXT

username TEXT

password TEXT

gender TEXT

Follower Table


Column Type

follower_id INTEGER

follower_user_id INTEGER

following_user_id INTEGER

Here, if user1 follows user2 then,


follower_user_id is the user ID of user1 and following_user_id is the user ID of user2.




Column Type

tweet_id INTEGER

tweet TEXT

user_id INTEGER

date_time DATETIME

Reply Table


Column Type

reply_id INTEGER

tweet_id INTEGER

reply TEXT

user_id INTEGER

date_time DATETIME

Like Table


Column Type

like_id INTEGER

tweet_id INTEGER

user_id INTEGER

date_time DATETIME

Sample Valid User Credentials

API 1

API 2

Authentication with JWT Token

API 3

API 4

API 5

API 6

API 7

API 8

API 9

API 10

API 11


1
Expert's answer
2021-09-29T01:32:31-0400
t=# SELECT c.column_name, c.data_type, pgd.description
from pg_catalog.pg_statio_all_tables as st
inner join pg_catalog.pg_description pgd on (pgd.objoid=st.relid)
right outer join information_schema.columns c on (pgd.objsubid=c.ordinal_position and  c.table_schema=st.schemaname and c.table_name=st.relname)
where table_schema = 'public' and table_name = 's150';
  column_name  | data_type | description
---------------+-----------+-------------
 customer_name | text      |
 order_id      | text      |
 order_date    | date      |
(3 rows)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS