Consider the following relations containing information about authors, articles and which author authored which papers (a paper can have several co-authors):

Author(authorID, name)
Authoring(articleID, authorID)
Article(articleID, title, venue, year, month)

Express the following queries in Algebra

a. List the articles authored by John Smith
b. List the co-authors of John Smith (authors who co-authored an article with John Smith)
c. List all the articles published last year
d. List pairs of articles that have the same titles with different article IDs
e. List the authors with no article in the database
f. List the authors who have all their papers co-authored with John Smith
g. List the papers authored by only one author (without aggregate functions)
h. Which author co-authored at least 1 paper with every author (without aggregate functions)
i. List the authors who have all their papers co-authored only with John Smith (No other co-author)

Respuesta :

Answer:

The description of the given point can be defined as follows:

Explanation:

In option a:

List the articles authored by John Smith

[tex]\pi[/tex]Article.title ([tex]\delta[/tex](Author.authorID=Authoring.authorID)^ (Article.articleID=Authoring.articleID)^ (Author.name=’John Smith’) (Article [tex]\times[/tex] Authoring [tex]\times[/tex] Author))

In option b:

Listed all John Smith but also Marc Antoine's articles  

[tex]\pi[/tex] Article.title ([tex]\delta[/tex](Author.authorID=Authoring.authorID)^ (Article.articleID=Authoring.articleID)^

(AUTOR.NAME='JohnSmith 'or "John Smith'Marc Antoine" )

(article [tex]\times[/tex] Authoring  [tex]\times[/tex] Author)

In option c:

Review the John Smith co-authors (authors co-authors with John Smith)  

ID (Author.authorID = Authoring.authorId)^(Article.articleID =Authoring.articleID)^(Article.articleID = Authoring.articleID)^  

(Author.name='John Smith') (Paragraph x Author)  

[tex]\pi[/tex]  Article.title ([tex]\delta[/tex](article.item ID = Addresse.itemID)^(Authoring.art.item = art)  

(Paragraph [tex]\times[/tex] Authoring)

In option d:

List all of that year's papers  

[tex]\delta[/tex] (Article.year=2019)  

In option e:

List the authors without a database post  

authorInDatabase = [tex]\pi[/tex] Authoring.authorID (δ(Author.authorID=Authoring.articleID) )

(Author [tex]\times[/tex] Authoring)

authorTotal =  Author.authorID (δ (Author.authorID=Authoring.articleID)

(Author [tex]\times[/tex] Authoring)

AuthorsWithNotWithArticles = authorTotal - AuthorInDatabase

In option f:

Listed of writers that have co-authored both published publications to John Smith  

Authors = [tex]\pi[/tex]  Book.authorID ([tex]\delta[/tex] Author.authorID)^(Article.articleID = Authoring.articleID)^ Authoring.articleID)^ Book Authors  

(Paragraph [tex]\times[/tex] Authoring) (Author.name='John Smith')  

[tex]\pi[/tex] Author.name ([tex]\delta[/tex] (Art.articleID = Author.articleID)^(Authoring.authorID = Authoring. Authoring. AuthorID)  

(Physician[tex]\times[/tex] Authoring)