Solution:
The query for creating the table is given below:
TableName: Authors
CREATE TABLE Authors(
authorID int NOT NULL,
firstName varchar(32),
lastName varchar(32),
email varchar(32)
PRIMARY KEY (authorID),
);
TableName: Venues
CREATE TABLE Venues(
venueID int NOT NULL,
name varchar(100),
acronym varchar(16),
type char(10)
PRIMARY KEY (venueID),
);
TableName: Papers
CREATE TABLE Papers(
authorID int NOT NULL,
title varchar(100),
year int,
venueID int,
PRIMARY KEY (PaperID),
venueID int FOREIGN KEY REFERENCES Venues(venueID)
);
TableName: Citations
CREATE TABLE Citations(
citationID int NOT NULL,
paperID int,
paperID FOREIGN KEY REFERENCES Venues(paperID)
);
TableName: PapersByAuthors
CREATE TABLE PapersByAuthors(
authorID int NOT NULL,
paperID int
PRIMARY KEY (authorID, paperID),
paperID int FOREIGN KEY REFERENCES Papers(paperID),
authorID int FOREIGN KEY REFERENCES Authors(authorID)
);
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Consider the computer science bibliography domain described in Lab Assignment 1. Consider the schema in Figure...
Write the following questions as queries in SQL. Use only the operators discussed in class (in particular, no outer joins are allowed). Please use renaming consistently! The following database schema is given: RESEARCHER(rid,name,institution,city,country) PAPER(title,journal,volume,number,year) AUTHOR(resid,title) where rid is the identifier (primary key) of RESEARCHER, name is the researcher’s name, institution is where the researcher works, and city and country the city and country where the institution is located; title is the paper identifier (primary key) of PAPER, journal is the...
--- Paper Review drop table paper_review cascade constraint; drop table paper_author cascade constraint; drop table paper cascade constraints; drop table author cascade constraints; drop table reviewer cascade constraints; create table reviewer ( rid int, --- reviewer id rname varchar(50), --- reviewer name remail varchar(50),-- reviewer email raffiliation varchar(50),-- reviewer affiliation primary key (rid) ); insert into reviewer values(1,'Alex Golden', 'golden@umbc.com','UMBC'); insert into reviewer values(2,'Ann Stonebraker', 'ann@umd.edu','UMD'); insert into reviewer values(3,'Karen Smith', 'karen@umb.com','UMB'); insert into reviewer values(4,'Richard Wallas', 'richard@umbc.edu','UMBC'); insert into...
Homework Help!!
1. Draw an ERD for the following situation. Be sure to show: entity information, attributes, identifier(s), relationships and relationship names, and cardinality Each publisher has a unique name; a mailing address and telephone number are also kept on each publisher. A publisher may publish one or more books; a book is published by exactly one publisher. A book is identified by its ISBN, and other attributes are title, price, and number of pages. Each book is written by...
1. Draw an ERD for the following situation. Be sure to show: entity information, attributes, identifier(s), relationships and relationship names, and cardinality Each publisher has a unique name; a mailing address and telephone number are also kept on each publisher. A publisher may publish one or more books; a book is published by exactly one publisher. A book is identified by its ISBN, and other attributes are title, price, and number of pages. Each book is written by one or...
please answer these queries. 1. List the artist name of the artists who do not have a webaddress and their leadsource is “Directmail” 2. List the names of members in the artist called 'Today'. 3. Report the total runtime in minutes FOR EACH album in the Titles table. 4.List the firstname, lastname of members who are represented by the salesperson “Lisa Williams” 5.List EACH salesperson’s firstname along with the number of Members that EACH SalesPerson represents. DROP TABLES IF EXISTS...