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

Theory of eternity of life - origin of life, THEO R Y OF ETERNITY OF LIFE...

THEO R Y OF ETERNITY OF LIFE (PRAYER - 1880) - The theory of eternity of life, also called the steady-state theory , states that life has ever been in existence as at presen

In mode - parameter modes, IN Mode An IN parameter pass the values to ...

IN Mode An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value.

Overriding default locking, Overriding Default Locking By default, the...

Overriding Default Locking By default, the Oracle locks the data structures for you automatically. Though, you can request exact data locks on rows or tables when it is to you

Keyword, what is the use of declare keyword

what is the use of declare keyword

How transactions guard your database, How Transactions Guard Your Database ...

How Transactions Guard Your Database The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL

Bulk fetching - bulk bind performance improvement, Bulk Fetching The i...

Bulk Fetching The illustration below shows that you can bulk-fetch from a cursor into one or more collections: DECLARE TYPE NameTab IS TABLE OF emp.ename%TYPE; TYPE S

Effects of null operator, Effects of NULL Operator As a general rule-b...

Effects of NULL Operator As a general rule-but not a universal one-if NULL is an argument to an invocation of a system-defined read-only operator, then NULL is the result of t

Data abstraction, Data Abstraction The Data abstraction extracts the im...

Data Abstraction The Data abstraction extracts the important properties of data while ignoring the not necessary details. Once you design a data structure, you can fail to reme

Using default-declarations in sql, Using DEFAULT You can use the keyword...

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

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);

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