Question: solve using oracle Below is a database schema, which is used for a social networking website. 1 . Users ( login , firstName, lastName, password,
solve using oracle
Below is a database schema, which is used for a social networking website.
Userslogin firstName, lastName, password, description, dateJoined
Linksuser linkNo, link
Foreign key:
user rightarrow Users.login
EntriesentryId user, time
Foreign key:
user rightarrow Users.login
Commentsentry parentEntry, rootEntry,text
Foreign keys:
entry rightarrow Entries.entryId
parentEntry rightarrow Entries.entryld
rootEntry rightarrow Entries.entryId
Imagesentry caption, image
Foreign key:
entry rightarrow Entries.entryId
Blurbsentrytext
Foreign key:
entry rightarrow Entries.entryld
Friendsuser friend, sinceDate
Foreign keys:
user rightarrow Users.login
friend rightarrow Users.login Your main task is to create a "Database Schema Documentation DSD that fulfillscontains the following:
An introduction to explain the database represented in the provided schema.
Implement the database using a Database Management System DBMS of your choice, such as MySQL Oracle etc. Then add all the SQL code which was used to create the DB schema, tables and insert basic data to your DSD report.
Based on the inserted data, you need to provide examples that clarifies the following SQL joins concepts: left outer join, right outer join, and full outer join.
Write an SQL to retrieve the names of users who have posted comments on entries made by their friends. Use a subquery to identify the entries created by each user's friends.
rightarrow The query should display a logical relation with three columns:
UserName,
FliendName
Comment Text
Write an SQL query to display the users and the number of friends for each user. Use the COUNT aggregate function with GROUP BY
rightarrow The query should display a logical relation with three columns:
UserLogin,
EirstName
FriendCount
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
