patternMinor
Database design for Magazine website
Viewed 0 times
websitemagazinedesigndatabasefor
Problem
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 monthly issue.
I am finding it hard to design a database that can help me fetch menus from different table for example as show in image below
Example of Database
Sample Data
```
MagazinePages Table
PageID PageName LangID PagePositionNo PageURL PageInheritance
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 Multimedia 1 30 Page.aspx 0
6 Video 1 10 Videos.aspx 5
7 PhotoGallery 1 20 Gallery.aspx 5
8 News 1 40 News.aspx 0
9 Issues 1 50 # 0
10 Publication 1 60 Page.aspx 0
11 SpanishHome 2 10 Default.aspx 0
12 SpanisAbout Us 2 20 Page.aspx 0
------------------------------------------------------------------------------
Magazine Table
MagazineID MagazineIssueCode LangID MagazineTitle MagazineLiveIssue(CurrentIssue)
1 101 1 Mag Title 0
2 102 1 Mag Title 1
3 101 2 SpanisgMag Title 0
4 102 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
I am finding it hard to design a database that can help me fetch menus from different table for example as show in image below
Example of Database
Sample Data
```
MagazinePages Table
PageID PageName LangID PagePositionNo PageURL PageInheritance
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 Multimedia 1 30 Page.aspx 0
6 Video 1 10 Videos.aspx 5
7 PhotoGallery 1 20 Gallery.aspx 5
8 News 1 40 News.aspx 0
9 Issues 1 50 # 0
10 Publication 1 60 Page.aspx 0
11 SpanishHome 2 10 Default.aspx 0
12 SpanisAbout Us 2 20 Page.aspx 0
------------------------------------------------------------------------------
Magazine Table
MagazineID MagazineIssueCode LangID MagazineTitle MagazineLiveIssue(CurrentIssue)
1 101 1 Mag Title 0
2 102 1 Mag Title 1
3 101 2 SpanisgMag Title 0
4 102 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
Solution
I am finding it hard to design a database that can help me fetch menus from different table for example as show in image below
To me this sounds like you are trying to make your database design match the menus in the UI layout. This might work until the UI changes. Then will you change the database structure?
It might be better off to create proper tables based on the data itself, and then design some views that are more accessible by the UI.
To me this sounds like you are trying to make your database design match the menus in the UI layout. This might work until the UI changes. Then will you change the database structure?
It might be better off to create proper tables based on the data itself, and then design some views that are more accessible by the UI.
Context
StackExchange Database Administrators Q#27015, answer score: 4
Revisions (0)
No revisions yet.