Try splitting the article listings into two tables.
- Article
- ArticleElements
The first table would hold singular things about the article:
ArticleID
AuthorID (Foreign Key)-related to authors table
Title
Date
ect..
The Elements table would hold the body of the article in a one-many relationship related back to the Article table. Each page could be one record, or you could have one paragraph per record and then decide how many paragraphs you wish to show per page with your code.
Drop an email if you have questions.
ed wrote:
Hi.
I need some help on how to design the mysql database for an article section of my website.
There are a lot of authors and they are separated under different categories such as contemporary, science fiction, sport etc.
Every author has many different articles of their work. (most of them have around 10-20)
The problem is that some of the articles have more then one page
(some can go up to 20-30 pages)
I was thinking of building two tables.
authors
-id
-first name
-last name
-number of articles
-number of visits
-category s/he falls in
articles
-id
-author id
-title
-article
-date
-number of readings
That setup works fine but then i had to store the entire 10 or 20 pages in just one row. It would waste lots of uncessary bandwidth if the visitor only wants to read the first page. I would also need to split the article by using strings.
Th....