Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7055563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:45:50+00:00 2026-05-28T03:45:50+00:00

Is there a way we can dynamically create table and structure for a database

  • 0

Is there a way we can dynamically create table and structure for a database using Xml?

So that columns are generated using Xml as a reference.

Is something like that available in Cakephp?

Below is the sample XML that I intend to use: (I did not copy paste all of them as it is rather large)

</dsr_data_agg_stats>
      <state code="ACT">
        <post_code code="2600">
          <locality name="DEAKIN">
            <dwelling_type code="H">
              <typical_value rank="3341/3697">831000</typical_value>
              <dom score="1" rank="454/5673">56</dom>
              <discount score="0" rank="779/5673">5%</discount>
              <acr score="-1" rank="914/5531">59%</acr>
              <renters score="0" rank="5131/5627">42%</renters>
              <vacancy score="1" rank="4714/5673">2.61%</vacancy>
              <yield score="-1" rank="678/3697">3.69%</yield>
              <som score="1" rank="3915/5144">2.08%</som>
              <search_dsr score="-3" rank="3578/4009">4.9</search_dsr>
              <dsr rank="3121/5673">23</dsr>
              <sr rank="2552/5673">5.8</sr>
            </dwelling_type>
          </locality>
          <locality name="YARRALUMLA">
            <dwelling_type code="H">
              <typical_value rank="3438/3697">931250</typical_value>
              <dom score="1" rank="454/5673">56</dom>
              <discount score="0" rank="779/5673">5%</discount>
              <acr score="-2" rank="1999/5531">42%</acr>
              <renters score="0" rank="5131/5627">42%</renters>
              <vacancy score="1" rank="4714/5673">2.61%</vacancy>
              <yield score="1" rank="678/3697">4.76%</yield>
              <som score="0" rank="4333/5144">3.03%</som>
              <search_dsr score="-3" rank="3277/4009">7</search_dsr>
              <dsr rank="3121/5673">23</dsr>
              <sr rank="2552/5673">5.8</sr>
            </dwelling_type>

…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:45:51+00:00Added an answer on May 28, 2026 at 3:45 am

    I’m working on doing something similar, but with RSS feeds. I’ve found that I really like the redis syntax, which allows you to use as complex and rigidly structured a vocabulary as you like, but with all the advantages of access to any of the the major modern datatypes, laid out flatly on a hash map. There are very easy-to-use clients in a ton of different languages, but it boils down to thinking about how you can reliably structure string patterns to find what you want, like below, in the pattern ‘action’ ‘key’ ‘value’, where $ denotes a variabe component of the given string:

    get locality:$id = name
    list locality:dwellings = [dwelling:id, dwelling:id ...]
    map-get dwelling:id 'typical_value' = 'rank: $rank\tvalue: $value'
    

    I use PHP to interact directly with redis, and make client-side calls via jQuery $.post async interactions to a server-side interface which routes commands to the redis accessor class. The interface is pretty simple. Here is the jQuery side.

    /*QUERY
     *functional programming puts a big emphasis on "wrapping" repetitive tasks inside
     *another function. This one amounts to the same thing as a protocol in
     *Clojure, with the query map acting as the dispatch value that triggers
     *the right method on the server side, recieves and parses the response,
     *and then passes it on to the "body" of the client logic expressed in callback,
     *which causes side effects on the screen.
    */
    redgets.query = function(query_map, callback) {
        $.post(redgets.router, query_map, function(data) {
        return callback($.parseJSON(data));
        });
    };
    

    and an example query_map looks like the following:

    {method: 'locality_by_id', localityID: 'locality:1'}
    

    which for example the the PHP router could interpret with:

    $response = array();
    switch ($_POST['method']) {
    case 'locality_by_id':
        if ($_POST['localityID']) {
            $response = $this->locality_by_id($_POST['localityID']);
            break;
    //etc, until
    return json_encode($response);
    }
    

    where $this->locality_by_id() is a query you wrote to touch redis via the predis client interface.

    Redis makes random access of XML files much faster and easier to wrap your head around, once you wrap your head around laying tree data structures out on a flat map. Meaning, you have to write a parser that converts the DOM items to redis-friendly key-value pairs. I’m sure you’ll have some ideas about how best to do this. And once you’ve written a converter, it will be easy to do the reverse.

    (I would add more links, but spam control sez no)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Within vb.net is there a way I can dynamically create multiple reports using the
Is there a way I can control columns from code. I had a drop
Is there some way I can define String[int] to avoid using String.CharAt(int) ?
Is there a way I can create Windows firewall exceptions in VB2005? I'm trying
Section  TextFrame   Table    Row 1 - N, Dynamically generated using a datatable.  TextFrame   Table
Is there any way I can make user URLs? something like www.domain.com/username I know
Is there any way to alter the underlying database using EF using Code First
Is there any way can declare a bean in just like JSP UseBean in
is there way thats i can preselect an item when the page loads or
Is there some way I can use URLs like: http://www.blog.com/team-spirit/ instead of http://www.blog.com/?p=122 in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.