ber(11) ID P DISCOUNT JO na veDISCOUNT_ID Write a to display user name and password. Password should be generated by concatenating first three characters of user name and first three numbers in phone number and give an alias name as PASSWORD. Sort the result based on user name. SQL Code Required BUSES P BUS_NO number(11) SCHEDULE BUS NAME varchar2(20) t varchar2(3) date d varchar2(20) t varchar2(20) t P SCHEDULE_ID TRAVEL DATE SOURCE DESTINATION varchar2(20) t P BUS_NO DURATION TYPE TOTAL SEATS number(11) AVAIL_SEATS number(11) number(11) U NO number(11) * PAYMENTS DISCOUNTS DISCOUNT ID DISCOUNT AMOUNT number(11) varchar2(3) TICKET ID BD 10O TICKET ID FO P BD_ID PPAYMENT_ID varchar2(3)t varchar2(3) number(11) O DISCOUNT_ID varchar2(3) TICKETS DISCOUNT_ID varchar2(3) P SCHEDULE ID varchar2(3) CHEDULE_ID number(11) USER ID number(11) number(11) - TICKET_ID FARE PUSER ID NO SEATS O USERS PUSER_ID number(11) varchar2(20) t ADDRESS varchar2(100) t number(11) # EMAILID varchar2(30)t 2 primary key - not null pl foreign key al data type - number NAME PHNO d data type - date CANCELLATION lt| data type - varchar2 PCANCELLATION_ID varchar2(3)t OTICKET ID O BD_ID TICKET ID BOOKINGDETAILS varchar2(3) number(11) BD ID BD_ID number(11) ACC_NO number(11) NAME varchar2(10) t OUSER ID number(11) R ID

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Write a to display user name and password. Password should be generated by concatenating first three characters of user name and first three numbers in phone number and give an alias name as PASSWORD.
Sort the result based on user name.
SQL Code Required
BUSES
number(11)
BUS_NO
BUS_NAME varchar2(20) t
TYPE
TOTAL SEATS number(11) =
AVAIL_SEATS number(11)
SCHEDULE
P SCHEDULE ID
TRAVEL DATE
SOURCE
DESTINATION varchar2(20) t
O BUS NO
DURATION
varchar2(3)
dated
varchar2(20) t
varchar2(20) t
BUS NO
number(11)O
number(11) #
PAYMENTS
DISCOUNTS
DISCOUNT ID
DISCOUNT_AMOUNT number(11) #
varchar2(3)
TICKET ID P
PAYMENT_ID varchar2(3) t
BD IDOO TICKET_ID
OE O BD_ID
O DISCOUNT_ID varchar2(3)
varchar2(3)
number(11)DISCOUNT_ID
TICKETS
P TICKET ID
varchar2(3) CHEDULE ID
p SCHEDULE ID varchar2(3)O
number(11) #
FARE
USER ID
PUSER ID
NO SEATS
number(11) O
number(11) #
USERS
number(11)
varchar2(20) t
ADDRESS varchar2(100) t
number(11) #
EMAILID varchar2(30) t
PUSER ID
primary key - not null
NAME
e foreign key
PHNO
# data type - number
d data type - date
CANCELLATION
It| data type - varchar2
PCANCELLATION_ID varchar2(3) t
D O TICKET ID
BOOKINGDETAILS
varchar2(3)
PBD_ID number(11)
ACC_NO number(11) =
NAME varchar2(10) t
O USER_ID number(11),
O BD_ID
number( 11) BO_ID
number(11)
R ID
Transcribed Image Text:Write a to display user name and password. Password should be generated by concatenating first three characters of user name and first three numbers in phone number and give an alias name as PASSWORD. Sort the result based on user name. SQL Code Required BUSES number(11) BUS_NO BUS_NAME varchar2(20) t TYPE TOTAL SEATS number(11) = AVAIL_SEATS number(11) SCHEDULE P SCHEDULE ID TRAVEL DATE SOURCE DESTINATION varchar2(20) t O BUS NO DURATION varchar2(3) dated varchar2(20) t varchar2(20) t BUS NO number(11)O number(11) # PAYMENTS DISCOUNTS DISCOUNT ID DISCOUNT_AMOUNT number(11) # varchar2(3) TICKET ID P PAYMENT_ID varchar2(3) t BD IDOO TICKET_ID OE O BD_ID O DISCOUNT_ID varchar2(3) varchar2(3) number(11)DISCOUNT_ID TICKETS P TICKET ID varchar2(3) CHEDULE ID p SCHEDULE ID varchar2(3)O number(11) # FARE USER ID PUSER ID NO SEATS number(11) O number(11) # USERS number(11) varchar2(20) t ADDRESS varchar2(100) t number(11) # EMAILID varchar2(30) t PUSER ID primary key - not null NAME e foreign key PHNO # data type - number d data type - date CANCELLATION It| data type - varchar2 PCANCELLATION_ID varchar2(3) t D O TICKET ID BOOKINGDETAILS varchar2(3) PBD_ID number(11) ACC_NO number(11) = NAME varchar2(10) t O USER_ID number(11), O BD_ID number( 11) BO_ID number(11) R ID
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education