Answer the question
In order to leave comments, you need to log in
What is the best way to organize the database logic in my case?
I am writing a news parser.
Now the database has the following structure:
Tab1: Table with a list of source sites. Main fields: link to news feed, title, category, country, region, PHP link with parsing method, selectors for parsing and some more.
Tab2 - TabN - tables with news for each source. The fields are the same: title, picture, link to the page with the news. Now I'm trying to figure out how to fasten the date and time, so this field also appeared.
The site displays news by category (country->region->category)
Here I came across the opinion that in my case it is better not to split news by source, but to throw them into one table.
Attention, the question is: what is better? Dear experts!
What are the pros and cons of my current situation and bringing all the news into one table? (But, as I understand it, it is still better to separate regions and countries.)
They also wrote to me about partitioning, so I know a little about it.
But still not sure yet whether to merge or not.
For me, there are more advantages from combining: easier parsing, easier selection for display on the site.
But what if I don't know something? And the person who advised me this did not take into account something.
It's just that, as I understand it, a table with all the news, even from one region, will be big.
And one more nuance.
I want to introduce the ability for users to upload their sources.
Roughly speaking, I want to follow the news of a small rural school - I added a website and I receive news from this source as well. Then after all all the same different tables will be.... And in one selection after all to show. Or then for each user to make their own table of sources and on the site - a separate section with them?
In short, I'm confused ... I study the web and database from scratch and myself. And the idea came up not very simple for someone like me, apparently.
Here are screenshots of my current situation:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question