views:

570

answers:

4

While this question asked something similar too, I'm interested in this from another angle. I'm not interested in the GUI part but in the database/domain part.

(My preference is SQL Server with C#/ASP.NET but this Q should be language agnostic.)

When designing a CMS system, data needs to be stored in tables and a business layer needs to provide access to this data. First of all, a user database with user roles, of course. A mailbox for private messages per user would be nice. Allowing users to set up their own profiles with images and eye-candy would make it even more interesting but let's not focus on the users.

What else should there be in the database for a CMS system? And how should it relate to the other tables?


My focus is to get a clear domain model to use as a basis for any CMS system. Something they all share in common. I'm only interested in the design, so I can later evaluate sseveral existing systems with the preferred domain model, to see which one matches the most ideal situation.

+4  A: 

You need to decide what features your application needs, and what features beyond that you want to have in your application. From there you can work out what needs to go in your database. You're thinking about this backwards. The database supports the application, not the other way around (unless you're writing phpMyAdmin or similar!).

Matthew Scharley
Fine, but what about the most generic features that a CMS system would have? All CMS systems do share some specific functionality, often blogs or forums and galleries.
Workshop Alex
Again, it depends entirely on what you want to do. You might want blogs, forums and galleries, but I might want a way to edit simple pages with a list of links added on, like is actually on my website.
Matthew Scharley
Infact, my website, which is a Content Management System by definition, since it manages and allows me to edit my content is nothing like what I imagine you would define a CMS to be. My CMS doesn't have a concept of users besides the single admin user.
Matthew Scharley
+2  A: 

If it's a CMS for [I assume] dynamically maintaining a website, the first and foremost features should enable the users to:

  • Add/Edit/Remove pages (aka. nodes) - the structure of the site
  • Add/Edit/Remove menus, links - the navigation of the site
  • Add edit media (photos, video, etc.) - the content of the site

Then you can think of the other website-specific management features such as:

  • Managing products/customers if it's going to manage e-commerce websites
  • Various kinds of interactivity features -- comment/contact forms, etc.

A CMS is a big project to tackle, specially if you want to make it portable and/or reusable, expandable. I have already come through three versions of my own CMS -- first two versions in PHP and the latest one in .NET.

Cristi Cotovan
So, a Pages table, a Menus table, a Media table for generic purpose. Of course linked to the user who created/uploaded them, plus additional data for revisions. :-) We're slowly getting there! Is there more?
Workshop Alex
Oh, Table... Domain... There would be the Page domain, the Menu domain and the Media domain as three generic domains within the larger model.
Workshop Alex
+1  A: 

What you are asking is a technology question, which is not necessary related to the features the CMS itself has. My advice and the way I would approach it would be to use an ORM. The reason is that when you start designing the database you fall into the niche of DB concepts. The purpose of a CMS is to provide an easy way to manage content.

In this regard, extensibility is far more important than your database design and the user will not be able to see the database design. In short, start with an API, or if that is too much - just start with what you need to expose to the topmost layer. Then just somehow map this to the database without thinking about the structure itself. In this way, you would be concentrating on the problem you are solving rather than on the technology that might be needed to solve it. It feels more natural that way.

Slavo
No, more a design question. I'm focusing on the domain model, which should be in-between the database model and the GUI. Consider it a logical data model.
Workshop Alex
+1  A: 

While design Database for CMS,must be care full about Product/content data tables,registered user data tables and UI related changes data tables.

UI related data is nothing but a themes,skin which is most important.

Most of the CMS application has developed as requirement comes.so most of the times need to break the relation ship in tables and normalization rule.

But if we careful about some basic db structure which is Content pages or content data tables,Product tables,User permission tables(if using aspnet tables then its better),Order management table(for e-commerce sites) etc.

As well as business layer doing most important role when some big changes comes in CMS Project.

Some times tables have a big changes which not effect on pages,need to change in business layer.

Mangesh Deshpande