Hello,
This system is a mobile network monitoring tool.
The system receives data from the different network nodes, processes
that data (calculates a value using a user-defined formula) and stores
the data back on a DB.
Then you have a web-based user interface where you can pick which
mesaures you want to see and that shows you plots of the measures in a
given time-period.
Since you want to define different measures to different network nodes
and networks, you cannot have the measures "hard-coded" on the php
code or even have a fixed DB table strucutre. So you have to employ
the technique I described in my post (well, this was actually the form
I found to deal with the issue, I'm sure there are many other ways,
and possibly more clever than mine... ;-) ).
This procedure allows you to change the calculating formulas and
define new measures if you need. At first it was difficult to overcome
this problem, but the solution is very robust and works nice. In fact,
we are already making an expanded version of the application which
will be deployed on a major telecommunications equipmente manufacurer
branch office next April.
I don't know if I was clear in my exlaination. If threre's anything
else you want to know feel free to ask.
Cheers!
On Feb 9, 2:15 pm, "Max" <[EMAIL PROTECTED]> wrote:
> Hi Mindchanger,
>
> I will be interested in knowing more about the main requirements
> behind this... It looks interesting.
>
> On Feb 9, 1:50 am, "mindcharger" <[EMAIL PROTECTED]> wrote:
>
> > Hi Hawk,
>
> > I'm currently developing a system that shares that "dynamic table
> > creation" requirement with yours.
> > As far as I understand the problem, it's more a DB issue than a CAKE
> > issue.
>
> > I don't know if it will help you, but I will try to explain how I did
> > it.
>
> > 1) I have a table on the DB that "describes" the other tables I
> > create. To this table I call a "descriptor". Assume it has several
> > columns, but one of them is called "table_name".
> > 2) Creating a new table encompasses two steps:
> > i) Add a record to the "descriptor" table
> > ii) Create the proper table
> > 3) To access the table you must do 2 DB accesses:
> > i) Get all the descriptor records into a HTML select-box or something
> > (Ex.: "SELECT table_name FROM descriptors;")
> > ii) Get the chosen table into a var and then acessing the desired
> > table
> > (Ex.:
> > $table_name = <your-favorite-VIEW-data-retrieval-method>;
> > $query = "SELECT * FROM $table_name;";
> > $data = $this->{MODEL-NAME}->query($query);
> > )
>
> > The "$data = $this->{MODEL-NAME}->query($query);" allows you to force
> > the Model to execute your query.
>
> > As for the model, I found that when I want to use this "dynamic table
> > device" I have no use for the associated table, so I define:
>
> > $useTable=false;
>
> > ...on the model.
>
> > I hope it helps you. If the explanation was not clear or if you have
> > any other doubt feel free to ask me.
>
> > Good luck!
>
> > On Feb 8, 9:53 am, "Hawk|" <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > i wonder if it would be possible to store the associations in a table
> > > instead of storing them in the models/model.php file. So it would be
> > > more flexible. I need to create tables dynamic and associate them on
> > > the fly with others and i want to do this without touching the model
> > > file itself.
> > > Someone allready is using a similar method?
> > > or someone has an idea how to do this?.
> > > It would be a great help for me to get some response to this issue.
>
> > > Thx a lot Hawk.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---