Copied to clipboard

Flag this post as spam?

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


  • nojaf 91 posts 300 karma points
    Jan 10, 2014 @ 14:58
    nojaf
    0

    How does Umbraco store its data

    I'm wondering how Umbraco stores all it's content. You see there's an umbraco.config file in App_Data but is that a cache of is that the only data?

    Can every node you create be found in the database?

    And if you do stuff in you razor view, f.ex. loop through all the children of Model.Content. Where is that data from? Did it come from the database or the xml file?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 10, 2014 @ 15:09
    Lee Kelleher
    103

    Hi nojaf,

    The content data is stored as an XML document in-memory, which - as you noted - is dumped out to a file at /App_Data/umbraco.config (this is only used to quickly reload the XML document back into memory at app-start).

    All the raw data is stored in the database - primarily in the umbracoNode table, with references to various other tables (e.g. cmsPropertyData, etc). There's a database diagram floating around on this site somewhere (I don't have a link at the moment).

    So when you do stuff in a Razor view, you'll be accessing the in-memory XML when calling Model.Content, etc.

    Hope this answers some of your questions.

    Cheers,
    - Lee

  • nojaf 91 posts 300 karma points
    Jan 10, 2014 @ 16:23
    nojaf
    0

    Hello Lee,

    Thanks for the quick responds. So the backend probably also use the xml to render the tree in the content section, etc. And so it's also not a big deal if you remove your /App_Data/umbraco.config file? (Not that I have.)

    This does explain why everything can be query with X-Path.

    Thanks again,

    Nojaf

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Jan 10, 2014 @ 16:31
    Lee Kelleher
    0

    Hi Nojaf,

    Yep, if you ever delete the umbraco.config, then the website + back-office will still work fine. Then on the next web-app start-up, the file will be recreated. (The raw XML is stored in a database table called cmsContentXml)

    There is talk of in future the XML cache will be replaced with something else - maybe Lucene, (or something else clever) ... but for now it's XML (and if you know XPath, it will be your best friend!)

    Cheers
    - Lee

Please Sign in or register to post replies

Write your reply to:

Draft