Write sql code that will create the writes table, PL-SQL Programming

Assignment Help:

Question:

Consider the following relations (primary keys are underlined):

AUTHOR (ANo, aname, address, speciality)
PUBLISHER (PNo, pname, Location)
BOOK (BNo, Title, ISBN, PNo, Edition)
WRITES (BNo, ANo, ReleasedDate)

Where

AUTHOR contains author details and ANo (Author Number) is the primary key, aname stands for Author NAme. PUBLISHER contains publisher details and PNo (Publisher Number) is the primary key, pname stands for Publisher Name . BOOK contains details of the book and its primary key is Bno (Book Number).

Express the following queries in SQL:

(a) Write SQL code that will create the WRITES table. Choose appropriate data type and field size. Your answer should show the Primary key and Foreign key constraint. Make any assumption if possible.

(b) Write SQL code which will insert a row in the publisher table. Choose appropriate data value for the record.

(c) List all the titles published by Pitman?

(d) List all the speciality of all authors publishing a book with MIT Press.

(e) List the location of the publisher who published the book 'A guide to DB2'?

(f) List the names of all publishers publishing any book written by Smith or Jones.

(g) Gives the names of all publishers who have not published a book by Jones?


Related Discussions:- Write sql code that will create the writes table

Procedures in pl/sql, Procedures   The procedure is a subprogram which...

Procedures   The procedure is a subprogram which performs a specific action. You write procedures using the syntax as shown below: PROCEDURE name [(parameter[, parameter, .

Like operator-comparison operators, LIKE Operator You use the LIKE opera...

LIKE Operator You use the LIKE operator to compare the character value to a pattern. The Case is significant. LIKE returns the Boolean value TRUE when the character patterns mat

In operator-comparison operators, IN Operator The operator IN tests the ...

IN Operator The operator IN tests the set membership. This means "equal to any member of." The set may have nulls, but they are ignored. For illustration, the statement below do

Unnest operator in sql, UNNEST operator in SQL The inverse operator of...

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Dynamic sql - pl sql, Dynamic SQL: The Most PL/SQL programs do a predi...

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t

PROCEDURES AND FUNCTIONS QURIES, i NEED THE QURIES TO SOME OF THE PROBLEMS ...

i NEED THE QURIES TO SOME OF THE PROBLEMS USING plsql

Change sql file into csv for product registration, Change Sql file into CSV...

Change Sql file into CSV for product registration on Magento Project Description: I have a set of files that are in Sql format and could like for a developer to help me with

Merge two data sources to sql azure database, Project Description: I hav...

Project Description: I have two types of data sources. One that is a list in SharePoint and another that is an access desktop database. The access desktop database is fairly com

Obtaining a natural join by specifying the common columns, Obtaining a natu...

Obtaining a natural join by specifying the common columns Synatax: SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON USING ( StudentId ) However, a named columns join doe

Semidifference via except and join - sql, Semidifference via EXCEPT and JOI...

Semidifference via EXCEPT and JOIN - SQL SELECT * FROM (SELECT StudentId FROM IS_CALLED WHERE Name = 'Devinder' EXCEPT DISTINCT CORRESPONDING SELECT StudentId

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd