Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 579 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
asp.net CMS solution: best mechanism for storing the data in SQL

#1
I've worked on a number of CMS systems using the .NET platform (the CMS management system is in ASP.NET, and the site which renders the content is both ASP.NET and PHP).

I've traditionally stored the generated content in classes that serialize to XML, which is stored in MSSQL 2005/2008 in a varchar(max) field. This has made it convenient structuarally for different consumers of the content to work with, and it can be bound to classes (for re-opening the CMS record and editing it, or for the consuming website).

However, I've been wondering what type of storage mechanism is popular with other CMS shops, and if anyone likes or has serious issue with the approach I'm most familiar with.

Good, bad, ugly? What would you do?
Reply

#2
I personally treat the data as any other data that would be stored in the system, for example I have a module built for DNN that stores collection of text data, I have the following collection of columns in a table for it.

* EntryId
* UpdatedBy
* UpdatedDate
* CreatedBy
* CreatedDate
* SortOrder
* Content (NTEXT)
* Hidden (Bit)

I find that this keeps the data easy to find, and it is easy to manipulate regardless of the caller.
Reply

#3
In our CMS we use a similar structure to the one Mitchel Sellers describe, but we separate the content in its own table. This is useful when optimizing the database and allows us to easily share the functions for versioning of content. We then have one table per "entity type" like documents, products and so on, where we describe the entity.
Reply

#4
We have an ASP.NET CMS as our main product so I'm familiar with the problem. It depends what you mean by "generated content". If you mean user-entered, then we store HTML as ntext and other page elements using a table structure that allows us to have a flexible set of fields per page element (some are configured using one or two fields, others have dozens).

The main benefit of this is that the data in the database is representative of what is actually entered by the user. Storing XML in a SQL database is just adding a layer of re-direction that we don't need. You might be trying to get SQL to act like an OO store, which is a typical problem that ORMs help solve.

One problem you may come across is difficulty in re-using existing SQL search mechanisms with XML data.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through