Posts

Showing posts with the label Interview Questions

Scenario : 2

Create the Following Tables with suitable Primary keys , Foregin keys and identify the order of tables ? Dept Table                     : id, name Course Table                 : id, name, dept, other_info Teacher Table                : id, fname, lname, phone Section Table                 : id, course, teacher_id, capacity Student Table                : id, fname, lname, dob, phone Student_section Table   :         id, studid, sectionid Dept Table: id (Primary Key) name Teacher Table: id (Primary Key) fname lname phone Course Table: id (Primary Key) name dept (Foreign Key referencing Dept Table) other_info Section Table: id (Primary Key) course (Foreign Key referencing Course Table) teacher_id (Foreign Key refere...

Scenario : 1

Create the Following Tables with suitable Primary keys , Foregin keys and identify the order of tables ? Movie Table : movieid, movie_name, rating, duration, seatno, timeslotid Theatre Table : theatreid, seatno, moviename, movieid, staffid, timeslotid Timeslot Table : timeslotid, moviename, movieid, staffid, theatreid Booking Table : bookingid, bookingdate, bookingseat, booking_timeslot, staffid Ticket Table : ticketid, movieid, staffid, theatreid, bookingid Staff Table : staffid, fullname, mobile, email, dob Solution : Staff Table: staffid (Primary Key) fullname mobile email dob Timeslot Table: timeslotid (Primary Key) moviename movieid (Foreign Key referencing Movie Table) staffid (Foreign Key referencing Staff Table) theatreid (Foreign Key referencing Theatre Table) Movie Table: movieid (Primary Key) movie_name rating duration seatno timeslotid (Foreign Key referencing Timeslot Table) Theatre Table: theatreid (Primary Key) s...