Computer Science, asked by kanakv08, 6 months ago

18. Consider the tables given below and answer the questions that follow:
Table: Event
Eventld
Event
NumPerformers CelebrityID
101 Birthday
10
C102
102 Promotion Party 20
C103
103 Engagement 12
C102
104 Wedding
15
C104
Table: Celebrity
CelebrityID
Event
Phone FeeCharged
C101
FaizKhan
99101956
200000
C102
Sanjay Kumar 893466448
250000
C103
Neerakhan Kapoor 981166568
300000
C104
ReenaBhatia 65877756
100000
(a) Name the Primary keys in both the tables and Foreign key in 'Event' table. Can NumPerformers
(Number for performers) be set as the Primary key? Give reason.
(b) How many rows will be present in the Cartesian join of the above-mentioned two tables?
(c) Write the commands in SQL:
(i) To display Eventld, Event name, Celebrity Id and Names of celebrities for only those events that
have more than 10 performers.
(ii) To display Event name, Celebrity Id and Names of celebrities who have "Khan" anywhere in
their names.
(iii) To display Event name, Names of celebrities and Number of performers who charge more
than 200000.​

Attachments:

Answers

Answered by BrainlyAryabhatta
5

Answer:

Explanation:

Prog. 1

Class name

: Prime

Member Methods:

Prime()

void input(int x)

void display()

: default constructor to initialize n

: to assign n with x

: to check whether the number is prime or not

Write a program by using a class with the above specifications:

​Prog. 1

Class name

: Prime

Member Methods:

Prime()

void input(int x)

void display()

: default constructor to initialize n

: to assign n with x

: to check whether the number is prime or not

Write a program by using a class with the above specifications:

Similar questions