Re: Design suggestions - performance improvement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Nock wrote:
Hi all,

I am currently building a site for a cinema to display session times, film synopsis' etc...

I have built the database as follows:

TABLE:  film_detail
FilmID
FilmName
FilmRunTime
FilmRating
FilmSynopsis
etc...

TABLE  session_data
session_ID
session_filmID
session_StartTime
session_Date



normalize the SESSION_DATA more.

i would:

table:film_date
fd_id
fd_filmid
fd_date

table: session_data
sd_id
sd_fd_id (<- foreign key)
sd_starttime

psuedo code:

print movie info
for (movie)

  select fd_date from film_date where fd_filmid = filmID
  print fd_date
  for (filmID -> fd_date)

     loop
        select sd_starttime from session_data where fd_id = sd_fd_id
        print sd_starttime
     end loop

  next fd_date

next movie


film_detail has a 1 to many to film_date
film_date has a 1 to many to session_data


--
-----------------------
Leo G. Divinagracia III
ldivinag@csuhayward.edu


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux