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.
1. Users(login, firstName, lastName, password, description, dateJoined)
2. Links(user, linkNo, link)
Foreign key:
- user \(\rightarrow \) Users.login
3. Entries(entryId, user, time)
Foreign key:
- user \(\rightarrow \) Users.login
4. Comments(entry, parentEntry, rootEntry,text)
Foreign keys:
- entry \(\rightarrow \) Entries.entryId
- parentEntry \(\rightarrow \) Entries.entryld
- rootEntry \(\rightarrow \) Entries.entryId
5. Images(entry, caption, image)
Foreign key:
- entry \(\rightarrow \) Entries.entryId
6. Blurbs(entry,text)
Foreign key:
- entry \(\rightarrow \) Entries.entryld
7. Friends(user, friend, sinceDate)
Foreign keys:
- user \(\rightarrow \) Users.login
- friend \(\rightarrow \) Users.login Your main task is to create a "Database Schema Documentation (DSD)" that fulfills/contains the following:
1) An introduction to explain the database represented in the provided schema.
2) 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.
3) 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.
4) 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
5) 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
solve using oracle Below is a database schema,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!