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’

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter7: Introduction To Structured Query Language (sql)
Section: Chapter Questions
Problem 21P: Write the SQL code to calculate the ASSIGN_CHARGE values in the ASSIGNMENT table in the...
icon
Related questions
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
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Intermediate SQL concepts
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
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning