Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

List all projects that are worked on by both (ie. not either or, but both) Narayan and Jabbar (last names). List the project name and

image text in transcribed

  1. List all projects that are worked on by both (ie. not either or, but both) "Narayan" and "Jabbar" (last names). List the project name and id.
use sompanydb: CREATE TABLE Department( DName DNumber MGRSSN MgrStartDate PRIMARY KEY (DNumber)); VARCHAR (15) INTEGER CHAR (11) DATE NOT NULL, NOT NULL NOT NULL, CREATE TABLE Employee( SSN BRate Sex Address Salary FName Minit Name NOT NULL, CHAR (11) DATE CHAR (1), VARCHAR( 40), INTEGER CHAR (20), CHAR(1), CHAR (20), INTEGER CHAR (11), SuperSSN PRIMARY KEY (SSN); CREATE TABLE Project( PName PNumber. PLocation DNum. PRIMARY KEY (PNumber), FOREIGN KEY (DNum) REFERENCES Department (DNumber)); CHAR (20) INTEGER CHAR (40), INTEGER NOT NULL, NOT NULL, NOT NULL, CREATE TABLE Dependent dependent_name Sex Bdate Relationship ESSN PRIMARY KEY (dependent_name, ESSN), FOREIGN KEY (ESSN) REFERENCES Employee(SSN)); NOT NULL, CHAR (40) CHAR (1), DATE CHAR (10), CHAR (11) NOT NULL, CREATE TABLE Works_On ESSN CHAR (11) INTEGER DECIMAL(5,2), NOT NULL, NOT NULL, Hours PRIMARY KEY (ESSN, PNQ), FOREIGN KEY (ESSN) REFERENCES Employee(SSN), FOREIGN KEY (PNo) REFERENCES Project (PNumber)); CREATE TABLE DeptLocations( Dnumber. DLocation PRIMARY KEY (Dnumber, DLocation), FOREIGN KEY (Dnumber) REFERENCES Department (DNumber)); INTEGER VARCHAR(40) NOT NULL, NOT NULL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions