0

I’m currently working on a dynamic project, in which the users feed the database with new objects/data. Other users can later access the data other users provided.

Because the data’s coming directly from the user, I will sanitize the inputs. Nonetheless I don’t want them to feed data directly into my main database, so I thought of putting a new, temporary database in front of the main one. The idea is, that each newly created user data object is added to the temporary database with a report counter. If the row survives long enough without receiving a certain amount of reports, I want it to be pushed to the main database.

Would you rather use a single database and create separate tables for each the temporary and permanent data, create two separate databases, or do you have any other idea on how to design such a project?

Thanks in advance, I’m happy about everyones opinion!

  • 1
    "direct input" is not particularly specific. Maybe you should describe the problem it is meant to solve, not just the possible solution you came up with. – anx Jun 06 '21 at 11:01

1 Answers1

0

"I don’t want them to feed data directly into my main database" but... why? Just add a field with something like "verified" default 0, or a report counter (?) or even a timestamp of the insert into the table.

I wouldn't do any separate databases, temporary or so on.

The database TYPE is not specified: for example with mariadb (/ mysql) a horizontal sharding is possible (if you have performance problems) in which the records are automatically divided based on a field (as in your request). But I doubt it is necessary