XMLS,MySQL,PHP Generate & Store

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi group,

I am working on retrieving/storing information in a MySQL database that
requires the rows of the db scheme to be expandable. As an example of
what I am trying to do:
  You want to store info on a HOUSE

     ROOMS are in a house
        WINDOWS can be in a room or not
        DOORS can be there that lead to other rooms
        CARPET can be there
           the carpet has a specific COLOR
     end of ROOM details

     PEOPLE live in the house
        CLOTHES cover the people
     end of PEOPLE details
  end of HOUSE details

You can quickly see the relevancy of a good XML schema, and the logical
flow of the layout.

My problem is that everyone's house attributes are different. Some
folks have special PANELS that go in a ROOM, and some users don't want
to include PEOPLE in their house description.

I have been searching for a php, mysql, xmls style 'generator'(for lack
of proper term). I can piece togeather any code I need. So far I have
found a wonderful XML generator lib that will handle creating XMLS
which I can store in a simple DB 'text' row. But I am having a
difficult time 'piecing everything I need to do togeather'. I also
found a system that does everything I need, but it is written in Ruby:

My current idea for handling a web based HOUSE storage/generator system
    -create a very basic skeleton for a house to use as a standard
    -allow user to build the xmls that creates the house framework
      *the form has to be flexible to allow for the xml scheme creation
    -store the new XMLS in a db
    -allow user to select the XMLS layout and begin adding/editing
content to the DB
       *automatically update db based off form values
    -allow export of any information in the DB to any XMLS in the db

Pointers in the right direction appreciated.


Re: XMLS,MySQL,PHP Generate & Store

Quoted text here. Click to load it

Actually, in a normalized db design you would probably end up with
tables like:

houses, rooms, panels, peoples

and then add houserooms, housepeoples, etc to link them...

Quoted text here. Click to load it

As you are trying to save XML in a database, you would probably end up
with tables like:


Met vriendelijke groeten,
Tim Van Wassenhove <http://timvw.madoka.be

Site Timeline