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

Product-specific packages, Product-specific Packages The Oracle and dif...

Product-specific Packages The Oracle and different Oracle tools are supplied with the product-specific packages which help you to build the PL/SQL-based applications. For illus

Example of except operator - sql, Example of EXCEPT Operator - SQL Ex...

Example of EXCEPT Operator - SQL Example, like its counterpart in the theory book, illustrates the convenience of allowing any table expression to be the source for an INSERT

Using lock table, Using LOCK TABLE You use the LOCK TABLE statement to...

Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati

Seeking a programmer to design a legal document, Seeking a programmer to de...

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

Package standard, Package STANDARD The package named STANDARD defines t...

Package STANDARD The package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available

Pl/sql engine, Architecture The PL/SQL run-time system and compilation ...

Architecture The PL/SQL run-time system and compilation is a technology, not an independent product. Consider this technology as an engine that compiles and executes the PL/SQL

Opening a cursor, Opening a Cursor Opening the cursor executes the que...

Opening a Cursor Opening the cursor executes the query & identifies the result set that consists of all rows that meet the query search criteria. For the cursors declared usin

Null statement-sequential control, NULL Statement The NULL statement c...

NULL Statement The NULL statement clearly specifies in action; it does nothing other than to pass control to the next statement. It can, though, improve the readability. In a

Example of shorthand for a row constraint - sql, Example of Shorthand for a...

Example of Shorthand for a row constraint Example: Shorthand for a row constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Mark_in_range CHECK (Mark BETWEEN 0 AND 100);

Using delete - collection method, Using DELETE This process has three ...

Using DELETE This process has three forms. The DELETE removes all elements from the collection. DELETE(n) removes the nth element from the nested table. When n is null, then D

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