3 Replies Latest reply on Oct 28, 2007 6:00 PM by (Florencia_Alvado)

    Many to many wizard and DB Design

      I'm working in a site about cars painting workshop, my client needs to manage information about each repair of each car and each repair should have several reports, so i designed 4 tables: (rep means repair, not report)
      Cars: wich contains information about each car such as brand, model and number
      index_tb: wich links the other three tables

      id_idx_tb, id_rep, id_inf
      rep_main_tb: repairs table

      id_rep, start_date, end_date, etc, etc (these are details)
      reports_main_tbid_report, report_date, photo, etc.

      the relationship should be:
      one car could have many repairs, and each repair could have many reports, I dont find a good way to link all the tables and make the wizard work.
      Thanks in advance, and sorry for my english
      - Florencia
        • 1. Re: Many to many wizard and DB Design
          Level 1
          I forgot it... the question is, i dont know if my tables are well designed or how to do make de cascade becouse i get an error when choosing correctly the tables, and the tutorial isnt clear for me.
          Thanks again!
          • 2. Re: Many to many wizard and DB Design
            Günter Schenk Level 4
            Hi Florencia,

            I wonder about the purpose of having that extra "index_tb" table, as usually you´d just create the dependencies between the other 3 ones

            -----
            how to do make de cascade becouse i get an error when choosing correctly the tables
            -----

            what´s IMHO currently missing in your "rep_main_tb" and "reports_main_tb" tables, are some extra numeric columns for storing the related, say, "car_id" -- that´s something you´ll always need to provide for establishing a so-called "foreign key" to that very table that´s holding the comprehensive data. Isn´t that the "cars details" ?

            ------
            i dont know if my tables are well designed
            ------

            To my mind only :: the repairs table should provide a foreign key to the cars table, wheras the reports table should provide two foreign keys :: to the cars table plus the repairs table. At least I guess so without really knowing what you´re about to do with all that info, lol :-)

            Cheers,
            Günter Schenk
            Adobe Community Expert, Dreamweaver
            • 3. Re: Many to many wizard and DB Design
              Level 1
              Hi Florencia,

              I wonder about the purpose of having that extra "index_tb" table, as usually you´d just create the dependencies between the other 3 ones

              Your are right I had doubts about that index. deleted
              -----
              how to do make de cascade becouse i get an error when choosing correctly the tables
              -----

              what´s IMHO currently missing in your "rep_main_tb" and "reports_main_tb" tables, are some extra numeric columns for storing the related, say, "car_id" -- that´s something you´ll always need to provide for establishing a so-called "foreign key" to that very table that´s holding the comprehensive data. Isn´t that the "cars details" ?
              I'm using the plate number becouse in my country is unique (Also it's used by our clientes to view they data

              ------ dont know if my tables are well designed ------

              To my mind only :: the repairs table should provide a foreign key to the cars table, wheras the reports table should provide two foreign keys :: to the cars table plus the repairs table. At least I guess so without really knowing what you´re about to do with all that info, lol. Im working for paint and body shop. And he wants a page to show the clients the progress of each work (with photos), almost every day. And by the way, store into ordered albums all repairs.
              Many thanks... I'll try to make it work again