数据库设计杂志网站具有灵活的水平菜单 [英] Database design for Magazine website with flexible horizontal menus

查看:191
本文介绍了数据库设计杂志网站具有灵活的水平菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用asp.net web窗体(C#)和MS SQL Server作为一本杂志的网站,这将有每周一次的问题,后端数据库,设计一个基于CMS的网站。

I need to design a CMS based website using asp.net web form (c#) and MS SQL Server as backend database for a magazine website which will have weekly issues.

样本数据

MagazinePages Table
PageID  PageName    LangID  PagePositionNo  PageURL     PageInheritance //PageID 
1           Home        1         10        Default.aspx    0
2           About Us    1         20        Page.aspx       0
3           PageOne     1         10        Page.aspx       2
4           PageTwo     1         20        Page.aspx       2
5           Media           1         30        Page.aspx       0
6           Video       1         10        Videos.aspx     5
8           News        1         40        News.aspx        0
9           Archive     1         50        #               0
10          Publication 1         60        Page.aspx       0
11          SpanishHome 2         10        Default.aspx        0
12          SpanisAboutUs 2       20        Page.aspx   0
------------------------------------------------------------------------------
Magazine
MagazineID  MagazineIssueCode   LangID  MagazineTitle   MagazineLiveIssue(CurrentIssue)
1       1           1   Mag Title       0
2       2           1   Mag Title       1
3       1           2   SpanisgMag Title    0
4       2           2   Mag Title       1
------------------------------------------------------------------------------

News Table
NewsID  NewsTitle   NewsCatID   MagazineID  Language    
1   News one    100     1       1
2   News two    100     1       1
3   news three  200     1       1
4   News four   300     1       1
5   News Five   100     2       1
6   News Six    300     2       1
7   News seven  200     2       2
------------------------------------------------------------------------------

以上方法的问题是我可以创建子菜单只有当所有的记录都在 MagazinePages 上面的例子根据我可以创建关于我们和放子菜单;多媒体我该怎么设计我的数据库,这样我可以拉从不同的表中的数据,如新闻按类别(政治,文化...)及从杂志表格(第101,第102,第103 ....)

Problem with above approach is that I can create sub menus only if all the records are in MagazinePages based on above example I can create sub menus for "About Us" & Multimedia how can I design my database so that I can pull data from different table such as news by category (Politics, Culture...) & Issue from Magazine Table (Issue 101, Issue 102, Issue 103....)

我打算使用ASP菜单控制此这可能不是很灵活,因为我将有超过100个问题的杂志,我可以怎样或者多列菜单,asp.net使用

I am planning to use ASP Menu control for this which may not be very flexible, since I will have over 100 issue of magazine how or which multi column menu I can use with asp.net

我的数据库可能有许多流动,我将不胜感激帮助在这方面,这样我就可以使用这个数据库为这个CMS系统。请随时问问题,如果任何有关本

My database may have many flows, I would appreciate help in this regard so that I can use this database for this CMS system . Please feel free to ask question if any regarding this.

添加
。如果我需要从拉所有的菜单名称 MagazinePages 表那么很容易,但我一直在问到有没有如例子中所示的菜单结构。这个问题是我能生成菜单公司简介&安培; 多媒体 MagazinePages 表,但我没有这样的政治,经济,...... 101期,102任何页面,103 ..在作为信息存储在不同的表像新闻类别在新闻表&放此表;问题杂志表。我宁愿改变我的表的设计和放大器;使其灵活读取单独的表菜单信息,但我不知道如何

Added: If I need to pull all the menu name from MagazinePages Table then it is easy but I have been asked to have a menu structure as shown in the example. Problem with this is I can generate menus for AboutUs & Multimedia from MagazinePages Table but I don't have any pages like Politics, Economic, ... Issue 101, 102, 103.. in this Table as that information is stored in different table like News Category in News Table & Issue in Magazine table. I would rather change my table design & make it flexible to read menu information from separate table but I am not sure how

新闻表是不是在这个模式显示。

News Table is not show in this Schema.

我所做的就是我创建ps_Pages表CMS一样的页面,首页,公司简介,联系方式,MediaCentre .....

What I have done is that I have created ps_Pages Table for CMS Pages like, Home, Aboutus, Contact, MediaCentre .....

我店相关杂志(这实际上是条不同类别或类似的文化,政治,体育,人物标签...)在 art_Article

I store Pages related to Magazine (Which actually are article with different category or tags like culture, politics, sports, people ...) in art_Article table

推荐答案

为什么不能有一个单页处理的内容?

Why not have a single page deal with the content?

就叫 Page.aspx问题= 4和;页= 4

然后在你的代码,你知道这是第四期,他们希望第4页,那么你可以在其中进行翻译,然后决定在布局Page.aspx(或的.vb的.cs)代码。

Then in your code you know it's the 4th Issue and they want Page 4, then you can have code in the Page.aspx (.vb or .cs) which translates that and then decides on the layout.

所以,例如:

Page.aspx?Issue=4&Style=Article&Content=5

因此,在代码中,你可以走开,好它的问题4,从第4期获得数据库项第4期,还好他们想要的内容ID 5,再放入的风格文章

So in the code you could then go, Okay it's issue 4 get the database entries for Issue 4, okay they want Content ID 5 from Issue 4, then put in the style of an Article.

这意味着你不必多余的页面加入到数据库类型如你愿意,你可以只是简单地添加内容和产生的URL访问的项目内容只是需要显示的所有内容。

This means you don't have to add extra pages into the database type you can simply just add content as you wish and the item which generates the URLs to access the content just need to show all the content.

这篇关于数据库设计杂志网站具有灵活的水平菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆