Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

bartleby

Concept explainers

Question

SQL ( ORACLE SQL DEVELOPER ) :

THIS IS FIRST , SECOND AND THIRD TABLE for the Task 1 to solve :

create table author_45(

auth_name char(50),

gender char(1),

age number(3),

nationality char(50),

PRIMARY KEY (auth_name)

);

create table book_45(

isbn number(10),

title char(50),

ver_no number(2),

publisher char(50),

PRIMARY KEY (isbn)

);

create table writtenBy_45(

isbn number(10),

auth_name char(50),

yr_published number(4),

price number(3),

no_copy number(4),

PRIMARY KEY (isbn,auth_name),

foreign key (isbn) references book_45,

foreign key (auth_name) references author_45

);

insert into author_45 values ('Benoit','F',42,'French');

insert into author_ 45 values ('Antonini','M',33,'Italian');

insert into author_ 45 values ('McAven','F',31,'Australian');

insert into author_ 45 values ('Williams','M',90,'British');

insert into book_45 values (101,'atabases',1,'Possum');

insert into book_45 values (202,'SQL Primer',2,'Hall');

insert into book_45 values (246,'Databases',1,'West');

insert into book_45 values (500,'Informatics',4,'Hall');

insert into writtenby_45 values (101,'Benoit',1983,100,100);

insert into writtenby_45 values (246,'Williams',2000,200,120);

insert into writtenby_45 values (500,'McAven',2002,150,90);

insert into writtenby_45 values (202,'McAven',2005,300,4);

NOW :

TASK 1 :

Write a function to display appropriate message for a given book based on the criteria given below:

  • if (price <= 50) then ‘Cheap’
  • if (price> 50 and price <=100) then ‘Affordable’
  • if (price > 100 and price <= 150) then ‘Expensive’
  • else ‘Extravagant’
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education