Question
Suppose we have a Web server that has the data of the web pages stored inside a database, and not in operating system files. The
Suppose we have a Web server that has the data of the web pages stored inside a database, and not in operating system files. The pages are retrieved through queries when needed. The schema of the Web server application is:
• Page(Page ID: number(4) not null, Path: varchar(80) not null, Owner: varchar(15) not null, Last Modified: date not null, text: long not null) contains an entry for every web page on the server: An identifying number, a path, the owner, the date of last modification, and the text of the page (the HTML source code).
• Request(Request No: Number(5) not null, IP: varchar(15) not null, when: date, Page ID not null) is used to log requests for web pages: Whenever a browser requests a web page, the IP address of the requesting machine, a timestamp (attribute ”when”) and the ID of the page are stored in the table ”Request”. The requests are numbered and the number served as key.
• Keyword(Word: varchar(10) not null, Page ID: number(4) not null): is used for a local search function: It contains keywords (search terms) for each page. A page can be described by any number of keywords. Express the following Queries in Algebra and SQL
1. Which are the pages created by John Smith?
2. Which keywords are both used by John Smith and Mark Antoine?
3. List pairs of owner with at list one page sharing common keywords along with the pages (make sure not to include redundant information).
4. For every owner, list the very last update date along with the Page ID of the page updated (the last time a owner updated a page)
5. Which IP addresses never accessed John Smith’s Web pages.
6. Which keywords are used by all the page owners (in at least one of their pages)?
7. Which owner has at least one of his/her pages accessed by all the IP addresses?
Express the following Queries in SQL
1. List the number of accessed per day for every page.
2. On the average, how many pages are accessed by an IP address?
3. Which Web page is the most popular? For the SQL queries, create a database and populate it so that you get at least 1 answer for every query. Copy and paste both the query and the answer returned to show that you have run the query against a database system.
Step by Step Solution
3.39 Rating (183 Votes )
There are 3 Steps involved in it
Step: 1
ANSWER 1 Here we must write the keywords and there is a condition that the owner should be called Jo...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started