Reply to Re: standard and easy way to do schema design

Your name:

Reply:


Posted by Summercoolness on 08/15/07 23:37

On Aug 15, 4:08 am, Summercooln...@gmail.com wrote:

> let's say we are doing a website. the user can go over
> and type in the movie name and zipcode, and the website
> will return all the theaters showing that movie and at what
> time, for theaters in THAT zipcode only (for simplicity).


[i added the date to the Showings table below... because we want
showtimes for today, or tomorrow, etc]

So let's say the problem is just that simple, without needing zipcode
related information (such as the name of the district)...

We can write

Movies
id
title
showtimes and in which theaters >>>>>>>
duration
description

Theaters
id
name
zipcode
phone number
address line 1
address line 2
movies showing there and their showtimes >>>>>>>>

and we put the ">>>>>>>>" for things that are "multiple items".
(indicated by us writing it in plural, such as showtimes)
and for any ">>>>>>>>" line, we will need to create a separate table,
if that table doesn't already exist.

and for those ">>>>>>>>" lines, we will simply remove them from the
original table.

so in our case, we create a new table

Showings
movie_id
theater_id
movie start time
movie show date

and remove those ">>>>>>>>" lines in the original tables "Movies" and
"Theaters".

and that will complete the basic task? (assuming no future function
is needed).

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация