A user with escalated privileges can create the database in a privileged location, and then set the file permissions to the database to something less restrictive. For instance:
sudo touch /var/lib/my_shared_db.sqlite3
sudo chmod 666 /var/lib/my_shared_db.sqlite3
After this any user will be able to write to /var/lib/my_shared_db.sqlite3
. (Note: it's probably better to create a directory in /var/lib
named after your script and then put the db file(s) in it.)