Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1. In a movie theatre, one customer can buy many tickets but one ticket cannot be sold to many customers. Which SQL statement correspond to

Q1. In a movie theatre, one customer can buy many tickets but one ticket cannot be sold to many customers. Which SQL statement correspond to this constraint? cid stand for customer id. ticket_no stand for ticket number

1. create table customer_ticket(cid int, ticket_no char(10));

2. create table customer_ticket(cid int, ticket_no char(10), primary key(cid));

3. create table customer_ticket(cid int, ticket_no char(10), primary key(ticket_no));

4. create table customer_ticket(cid int, ticket_no char(10), primary key(cid, ticket_no));

Q2.For the movie theatre, which constraints below ensures that every ticket number is identifiable to a row and a seat number (within that row)? ticket_no stands for ticket number. row_no stands for row number. seat_no stands for seat number.

1.create table ticket_seat(ticket_no char(10), row_no int, seat_no int);

2. create table ticket_seat(ticket_no char(10), row_no int, seat_no int, primary key(ticket_no));

3. create table ticket_seat(ticket_no char(10), row_no int, seat_no int, primary key(ticket_no, row_no));

4.create table ticket_seat(ticket_no char(10), row_no int, seat_no int, primary key(ticket_no, row_no, seat_no));

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

Students also viewed these Databases questions