Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • kmacdonell 28 posts 45 karma points
    Jun 23, 2009 @ 18:21
    kmacdonell
    0

    Using Umbraco like a database

    Hi,

    I've been thinking recently about diffrent scenarios where Umbraco would seem at first glance to be an awkard choice. For example, if you wanted to have various diffrent views of the same data throughout you web site the first instinct would be to replicate the data fields on each page where it was to appear, thus creating data input redundancy.

    An example may be:

    A sports site that has:

    - Players
    - Managers
    - Pictures
    - Videos
    - Quotes
    - Time periods or Eras

    A player or a manager might have some pictures, quotes and video clips and they will have come from a certain era. You might want to have a Player detail page with all the information related to that player on it, an Era detail page with images, videos and quotes from players and managers of that era and a random quote on the home page.

    The best way that I can think to do this is to create what is in effect a data structure that is then referenced from the web pages. Like the following:

     

    Web site structure
    -----------------------
    - Home (with a random quote)

    - Players
    - Player 1 (Including: Quotes, Images, Videos, list of Managers played under, appearances, goals scored etc...)
    - Player n .....

    - Managers
    - Manager 1 (Including: Quotes, Images, Videos, Games won, lost etc....)
    - Manager n .....

    - Timeline
    - Era 1 (1980-1990) (Including: Player list, Manager list, Quotes, Images)

    - Statistics
    - Players
    - Top goal scorers
    - Most appearances
    - Longest Serving

    - Managers
    - Games Won
    - Games Lost etc...

     

    Seperate Data Node Structure
    --------------------------------------
    - Players
    - Player 1 (goals scored, appearances, first appearance date, last appearance date)
    - Images
    - Image 1
    - Image n
    - Quotes
    - Quote 1
    - Quote n
    - Videos
    - Video 1
    - Video n
    - Manager 1 (Games won, lost, drawn, goals scored, goals against)
    - Images
    - Image 1
    - Image n
    - Quotes
    - Quote 1
    - Quote n
    - Videos
    - Video 1
    - Video n

    So, roughly speaking, the web site can have many different views and treatments of the information while the information itself is stored in the most logical structure (almost like a standard database structure). Does anyone have any experience of this kind of approach or any alternative suggestions?

    Thanks,
    Kevin

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Jun 23, 2009 @ 19:00
    Casey Neehouse
    1

    Hi Kevin,

    How much data are you planning on having in your system?  If you are expecting to see a large amounts of nodes, I would suggest just using user controls and building a management interface into umbraco to manage players, managers, videos, photos, and stats.

    Umbraco can handle a large number of nodes, but management can become a bit unruly. 

    A Node that has 100 children will take a while to render in comparison to a small set of nodes.  1000 child nodes would be nearly impossible to wait for.

    So, simply, your structures are fine, but the question lies more with the quantity of nodes, and the effectiveness  of umbraco to handle those large numbers.

    Case

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Jun 23, 2009 @ 19:03
    Casey Neehouse
    1

    Hi Kevin,

    How much data are you planning on having in your system?  If you are expecting to see a large amounts of nodes, I would suggest just using user controls and building a management interface into umbraco to manage players, managers, videos, photos, and stats.

    Umbraco can handle a large number of nodes, but management can become a bit unruly. 

    A Node that has 100 children will take a while to render in comparison to a small set of nodes.  1000 child nodes would be nearly impossible to wait for.

    So, simply, your structures are fine, but the question lies more with the quantity of nodes, and the effectiveness  of umbraco to handle those large numbers.

    Case

  • kmacdonell 28 posts 45 karma points
    Jun 24, 2009 @ 00:06
    kmacdonell
    0

    Thanks Casey - It would most likely be in cases where there were a relatively small number of child nodes, certainly less than 100.

    When measuring performance does one node with ten direct child nodes perorm diffrently to  one node with two direct child nodes, each of which has four child nodes of their own? Is it the cumulative total of child nodes on all sub levels or just the direct child nodes that impact on performance?

    Thanks again,

    Kevin

  • Shannon Deminick 1525 posts 5271 karma points MVP 2x
    Jun 26, 2009 @ 21:52
    Shannon Deminick
    1

    You can always create your own tree structure with your own data model from your own data source!

    There's some instructions here:

    http://wifi.umbraco.org/wiki/reference/api-cheatsheet/tree-api---to-create-custom-treesapplications

    It's been imported from our blog which is here:

    http://farmcode.org/post/2008/11/25/Umbraco-Version-4-Tree-API.aspx

     

  • dillorscroft 198 posts 192 karma points
    Jun 26, 2009 @ 22:16
    dillorscroft
    0

    There is of course the option of creating an XSLT extension to interact with the data stored in a standard database.  This seems to me a very clean approach and limits the need for user controls.  As the other posts suggest you can easily create update capabilities in the Umrbaco manager interface as well.

     

    DC

  • CJM 1 post 0 karma points
    Jun 27, 2009 @ 11:37
    CJM
    0

    We've done something like this in one of our projects.  Unfortunately, doing things like this breaks the preview functionality, because the only unpublished item that gets shown when you preview is the current node.

    It's also a pain to do (we have ~10,000 nodes that we need to manage through the web interface), and makes the umbraco.config XML data file huge.

  • Biagio Paruolo 1594 posts 1825 karma points c-trib
    Apr 26, 2012 @ 12:19
    Biagio Paruolo
    0

    So, Do you suggest use Razor/XSLT to query external tables?

Please Sign in or register to post replies

Write your reply to:

Draft