inherited databases and understanding others logic
Posted: Wed Jan 26, 2005 7:51 am
I have inherited a database and am having to figure out how it's working. An example of the page it produces is here:
http://www.australiangold.com/lamps/lamps.asp
A selection in the first menu produces changes in the second menu. A selection made in the second menu then produces a list of compatible lamps based on the selection in the previous two lists. The purpose of the lamps.asp page is to show a user which lamps are compatible with which other lamps.
My problem is that I need to make sure that I understand how the tables in the database interact so that I may update them appropriately. I've already written my pages to update three tables and the relationship between the first two is very apparent. It's the third table that has me confused. There are three other tables which for all intents and purposes appear to be redundant and not necessary to the system at all which is adding to my confusion. I've assumed that the tables not ending in '2' are not necessary and have therefore focused strictly upon the ones ending in '2' (family2, lamp_type2 and replacement2).
I've written some code that will input data into table 3 and I've been working on a page to try and replicate the behavior of the lamps.asp page above. It can be viewed at http://www.australiangold.com/lampid/create.php . as you can see in that page I'm close - but not quite.
The table structure is as follows with basic info in parenthesis:
Table 1 = family (redundant?)
-id_name
-family_name
Table 2 = family2
- id_name
- family_name (name of lamp)
Table 3 = lamp_type (redundant?)
- id_type
- name
- family
Table 4 = lamp_type2
- id_type
- name (lamp type code)
- family (ties lamp code to name of lamp)
Table 5 = replacement (redundant?)
- id_compatible
- groupid
- familyid
- preferred
Table 6 = replacement2
- id_compatible
- groupid (ties to id_name and name of lamp)
- familyid (ties to id_type and type of lamp)
- preferred (??? not sure what this is for)
Anyway - I can't see how table three is used in such a way that it works with tables 1 and 2. But - as you can see from the link I posted at the top it does.
I don't need anyone to literally code anything for me. What I'm needing is some sort of plain language explanation about what you think is happening. Particularly with table 3. And a push in the right direction to help me make my file 'create.php' actually work.
Would it help if I posted my code for both pages I've linked to above?
Thanks for your help.
http://www.australiangold.com/lamps/lamps.asp
A selection in the first menu produces changes in the second menu. A selection made in the second menu then produces a list of compatible lamps based on the selection in the previous two lists. The purpose of the lamps.asp page is to show a user which lamps are compatible with which other lamps.
My problem is that I need to make sure that I understand how the tables in the database interact so that I may update them appropriately. I've already written my pages to update three tables and the relationship between the first two is very apparent. It's the third table that has me confused. There are three other tables which for all intents and purposes appear to be redundant and not necessary to the system at all which is adding to my confusion. I've assumed that the tables not ending in '2' are not necessary and have therefore focused strictly upon the ones ending in '2' (family2, lamp_type2 and replacement2).
I've written some code that will input data into table 3 and I've been working on a page to try and replicate the behavior of the lamps.asp page above. It can be viewed at http://www.australiangold.com/lampid/create.php . as you can see in that page I'm close - but not quite.
The table structure is as follows with basic info in parenthesis:
Table 1 = family (redundant?)
-id_name
-family_name
Table 2 = family2
- id_name
- family_name (name of lamp)
Table 3 = lamp_type (redundant?)
- id_type
- name
- family
Table 4 = lamp_type2
- id_type
- name (lamp type code)
- family (ties lamp code to name of lamp)
Table 5 = replacement (redundant?)
- id_compatible
- groupid
- familyid
- preferred
Table 6 = replacement2
- id_compatible
- groupid (ties to id_name and name of lamp)
- familyid (ties to id_type and type of lamp)
- preferred (??? not sure what this is for)
Anyway - I can't see how table three is used in such a way that it works with tables 1 and 2. But - as you can see from the link I posted at the top it does.
I don't need anyone to literally code anything for me. What I'm needing is some sort of plain language explanation about what you think is happening. Particularly with table 3. And a push in the right direction to help me make my file 'create.php' actually work.
Would it help if I posted my code for both pages I've linked to above?
Thanks for your help.