Reputation: 57
Ok, so I'm working on a project where the database will hold about 20000 elements all in one table. Example: I have a store that sells 20000 products and I'd like to update them daily. Only about 100-200 will be updated daily.
I was thinking of doing the whole database native so it would be faster. I'd like to know if that is good way to get into the problem or should I use any other mean of saving and showing the data? I'm worried that update files would be too huge for daily download/update.
Is it possible to update a database due to the fact that everytime you update the database it builds itself from 0?
Excuse my grammar. Jan
Upvotes: 3
Views: 1171
Reputation: 75646
You do not need to update database. You need to update database content. Let's your app store any kind of identifier (let say int). Each day you release update to your database content - only diff from content from previous day. Your app should then check what is current id of database on the server and then fetch and apply all the differences between id that db contains and recent version. Or build one update file on request knowing what revision of content customer have and what is recent. If users use your app daily then it will be no big deal.
s it possible to update a database due to the fact that everytime you update the database it builds itself from 0?
Then you most likely do this a bit wrong. You need to be able to build incrementally (or at least you should always be able to assign the same ID to i.e. the same product from the DB).
Or if final database dump is small (i.e. 5MB-50MB-500MB - you name it). Just let your app fetch whole DB file and replace old content without wasting time and efforts for incremental updates as handling of these can cost more time/money than replacing whole DB.
Upvotes: 2