One-step development of a Simple CMS background management system using ext js mvc and ASP. net mvc 3

Source: Internet
Author: User

The database of this management system uses SQL server2005, which mainly includes the t_category, t_content, t_tag, and t_tagincontent tables. For the sake of simplicity, the user authentication function will use the membershipper token, because the user table and the role table will be automatically generated using aspnet_regsql.exe. For more information, see relevant online materials. The following is a detailed description of the four tables.

1. Category Table: t_category

Field name

Type

Null allowed

Description

Categoryid

Int

No

Category Number, primary key, automatic increment, start value: 10000, mainly to sort the tree structure directly when using fullpath for sorting. If more than 90000 categories are not enough, you can set a larger starting value.

Parentid

Int

Yes

Parent node ID

Hierarchylevel

Int

Yes

Number of nodes. This field is automatically generated using the trigger.

Fullpath

Nvarchar (100)

Yes

The full path of a node. For example, if the parent node number is 10000 and the node number is 10001, the full path is ". 10000. 10001.". In this way, the number structure can be listed in one sort. This field will also be automatically generated through the trigger. Normally, as long as the field length is sufficient, the number of infinite layers can be achieved. Here, it is set to 100, which can reach 10 layers. It is estimated that it is enough. If it is not enough, you can increase the field length.

Title

Nvarchar (255)

No

Category title

Image

Nvarchar (255)

Yes

Question Diagram

[Content]

Nvarchar (max)

Yes

Category Description

Sortorder

Int

No

Sorting order number. The default value is 0. It is used for sorting in the category list.

State

Tinyint

No

Status. The default value is 0, indicating that it is available. If the value is 1, the object is deleted.

Created

Datetime

No

Creation Time. The default value is getdate ()

 

This table contains two triggers: trg_categoryinsert and trg_categoryupdate, which are used to update the node layers and full paths when inserting or updating a category. You can download the database and attach it to the database to view details.

You also need to create a "Unclassified" category so that when the category is deleted, all the content under the category can be transferred to the "Unclassified" category.

 

2. Content table: t_content

Field name

Type

Null allowed

Description

Contentid

Int

No

Content ID, primary key, auto increment, start value: 1.

Title

Nvarchar (255)

No

Content title.

Categoryid

Int

No

Content category.

Image

Nvarchar (255)

Yes

Question Diagram

Summary

Nvarchar (500)

Yes

Content summary

[Content]

Text

Yes

Content

Created

Datetime

No

Creation Time. The default value is getdate ()

Hits

Int

No

Clicks. The default value is 0.

State

Tinyint

No

Status. The default value is 0, indicating that it is available. If the value is 1, the object is deleted.

Sortorder

Int

No

Sorting order number. The default value is 0. It is used for sorting the content list.

 

3. Tag table: t_tag

Field name

Type

Null allowed

Description

Tagid

Int

No

Tag number, primary key, auto increment, start value: 1.

Tagname

Nvarchar (255)

No

Tag to create a unique index for it.

 

4. Label and content Association Table: t_tagincontent

Field name

Type

Null allowed

Description

Contentid

Int

No

Content number, foreign key, and tagid composite primary key

Tagid

Int

No

Tag number, foreign key, composite primary key with contentid

 

Database: http://download.csdn.net/detail/tianxiaode/4509484

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.