2 Replies Latest reply on Mar 26, 2008 12:33 AM by (Olle_Karneman)

    Design of database

      Hi.
      Before I paint myself into a corner I have some questions.

      The actual site is built with ADDT and will show pictures and movie clips from different persons.

      Ex at http://www.olle.se.st/riviera_test/index2.php will show the most "hot" movies. Click on picture and a new page with movie and movie data opens.
      http://www.olle.se.st/riviera_test/filmsid1.php?id=2

      On another page is the personnel http://www.olle.se.st/riviera_test/personal.php
      Click on picture of person opens the page for that person ex, http://www.olle.se.st/riviera_test/jean_paul.php click on picture there opens that persons movie page, http://www.olle.se.st/riviera_test/filmjeanpaul.php?id=2

      At first I was thinking of one table in the database for personnel. And the one table fore each person containing the movies and data for the movies.

      But that could end up in a lot of tables. It could be up to 20 persons. In that case I guess I guess I have to do 20different jean_paul.php and filmjeanpaul.php?id=2 pages,if you understand what I mean.

      The question id then if it maybe is enough with two tables? One for persons and one fore movies that is linked with a "foreign key" in movies that keeps track on who have what movies.

      I have been looking at the Image gallery tutorial at the ADDT site but I'm not quite sure it is exactly what I need.

      I also want it to be easy to administer fore someone else but me. Eg delete and add persons and movies.

      I'm greatful fore some thoughts or suggestions.

      Regards
      Olle
        • 1. Re: Design of database
          Günter Schenk Level 4
          Hi Olle,

          -------
          At first I was thinking of one table in the database for personnel. And the one table fore each person containing the movies and data for the movies
          .....

          The question id then if it maybe is enough with two tables? One for persons and one fore movies that is linked with a "foreign key" in movies that keeps track on who have what movies
          -------

          you´re on the right track with this approach -- one "movies" table would be all you ever need, as long you´d store the respective "personnel_id" in an extra column and define this one as foreign key to your "personnel" table´s primary key.

          -----
          20 different jean_paul.php and filmjeanpaul.php?id=2
          -----

          while it´s certainly OK to provide one "personnel_name.php" for each movie owner, I´d personally never link to individual "filmpersonnel_name.php" files from here, but rather provide one abstract "movie_details.php" page which receives the "personnel_id" as URL parameter, e.g. movie_details.php.php?personnel_id=4

          -------
          I also want it to be easy to administer fore someone else but me. Eg delete and add persons and movies
          -------

          you could use ADDT´s "levels" system for that, e.g. give an administrator a level of 1 and apply a "Restrict Access to Page" to the "admin_movies" lists and forms to make sure that only a "level 1" user can access these pages

          Cheers,
          Günter Schenk
          Adobe Community Expert, Dreamweaver
          • 2. Re: Design of database
            Level 1
            Thanks for the input. I have now a fully functional site. (at another location than my testsite).

            I have one more question before its complete. I'll post that in a separate post.

            Regards
            Olle