Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
19.2k views
in Computer by (76.4k points)

Consider the tables given below and answer the questions that follow :

Table: Event

EventId Event NumPerformes CelebrityID
101 Birthday 10 C102
102 Promotion Party 20 C103
103 Engagement 12 C102
104 Wedding 15 C104

Table: Celebrity

Celebrityld Name Phone FeeCharged
C101 Faiz Khan 99101956 200000
C102 Sanjay Kumar 893466448 250000
C103 Neera Khan Kapoor 981166558 300000
C104 Reena Bhatia 65877755 100000

(i) 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.

(ii) How many rows will be present in the Cartesian join of the above mentioned two tables?

In the table 'Event', the CelebrityID 102 is present twice in the column "CelebrityId". Is there any discrepancy ? Give reason.

1 Answer

+1 vote
by (75.2k points)
selected by
 
Best answer

(i) Primary Key in Event: EventId

Primary Key in Celebrity: CelebrityId

Foreign Key in Event: CelebrityId

No, NumPerformers cannot be set as a Primary Key, because the number of performers can be same in multiple fields and also they have to proper patters when we talk about the teams.

(ii) 16 rows.

No, there will not be any discrepancy in the Event table because, it is not the primary key, it is only Foreign Key, whose value can appear multiple times as same.

Related questions

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...