Relational Schema
Production(Title,BasicTicketPrice)
Performance(PerfDate,PerfTime,Title)
Zone(Name,PriceMultiplier)
Seat(RowNumber,Zone)
Booking(Email,PerfDate,PerfTime,RowNumber)
Constraints
Not Null:
We have provided table creation and insert statements for Zone and Seat. Use these to create and populate the two tables.
Zone
Seat
You will need to define your own table creation and insert commands for the following data:
ProductionTitle | BasicTicketPrice |
---|---|
Cats | 15.00 |
Fame | 15.00 |
Tosca | 30.00 |
PerfDate | PerfTime | Title |
---|---|---|
2017-11-01 | 19:00:00 | Cats |
2017-11-02 | 19:00:00 | Cats |
2017-11-03 | 19:00:00 | Cats |
2017-11-03 | 13:00:00 | Cats |
2017-11-04 | 19:00:00 | Fame |
2017-11-05 | 13:00:00 | Fame |
2017-11-05 | 19:00:00 | Tosca |
2017-11-06 | 13:00:00 | Tosca |
2017-11-06 | 19:00:00 | Tosca |
PerfDate | PerfTime | RowNumber | |
---|---|---|---|
ZP@email.com | 2017-11-01 | 19:00:00 | Z18 |
ZP@email.com | 2017-11-01 | 19:00:00 | Z19 |
Jane.Dot@live.com | 2017-11-01 | 19:00:00 | Z16 |
Jane.Dot@live.com | 2017-11-05 | 13:00:00 | U20 |
Jane.Dot@live.com | 2017-11-05 | 13:00:00 | U19 |
Mike.Stand@email.com | 2017-11-05 | 13:00:00 | X13 |
Mike.Stand@email.com | 2017-11-05 | 13:00:00 | X14 |
qvf3@live.com | 2017-11-05 | 13:00:00 | Z19 |
How it will be marked
The mySQL commands must work on the dragon mySql system or they will get 0 marks.
Submit, via moodle, a single .txt file containing all your create table, data insertion and queries. The .txt file should contain only working SQL.
The deadline is given on moodle. Late submissions, without concessions, will be given 0 marks.
Peter Rodgers
p.j.rodgers@kent.ac.uk