English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

This is a refined version of a question I asked yesterday.

The database in question is for a movie theatre's web site. The company has multiple locations.

Movies table lists all of the movies with relevant data like cast, rating, run time, etc. Each location can play each movie.

Theatre table lists each movie theatre with info like address and phone number

Dates table lists the opening and ending date for each movie at each theatre. The dates are not necessarily the same for each theatre.

Times table lists movie id, theatre id, time start date, time end date, time, auditorium number. Each individual time is a single record, for example:
theatre 1, movie 1, friday, sunday, 1:00, aud 1
theatre 1, movie 1, friday, sunday, 3:00, aud 1
theatre 2, movie 2, friday, sunday, 1:00, aud 3

When dealing with multiple prints (copies) of a movie at the same theatre I just add additional records to the show times table with a different auditorium number. More in the added detail.

2007-10-10 08:46:08 · 1 answers · asked by Justin H 7 in Computers & Internet Programming & Design

I want a better way to deal with multiple prints at the same location because the current method makes it difficult (or very complex) when trying to do some queries for reports.

I basically have two different ideas.

First, add a print (copy) number to the dates table and default to 1 since most movies only have one copy.

Second, add a print (copy) table which would include a start and end date for each print.

Currently when I generate schedules I query dates first so movies are listed newest to oldest, then run a sub-query for times. Although I just realized I can probably do the same thing by querying times with a join for dates and then use the script to process the results.

2007-10-10 08:53:21 · update #1

1 answers

With the details you've given, it sounds like your first solution makes the most sense (add an aud field to each record that defaults to 1).

However, I'm not 100% what you're you're trying to fix. You said the current queries are too complex but can you give an example? Some questions I have are: What do you see now, How do you build the query for the results and What would you like to see instead?

2007-10-10 09:01:47 · answer #1 · answered by Amanda 2 · 0 0

fedest.com, questions and answers