I’m working on an app and need a way to store private data for each user. I was thinking about using Google Drive as a kind of database. Here’s what I’m trying to do:
- Each user would have their own set of data (like a list of online meetings)
- Users shouldn’t be able to see each other’s data
- I’d be okay with using files to store the data, either one file per table or one file per entry
I know Google Drive has an app folder feature, but I’m not sure if it’s the right fit. Has anyone tried this before? Is it a good idea?
I’m also looking at Firebase, but Google Drive seems like it might be cheaper and easier for users to understand. Any thoughts on this approach?
# Example of how I might store a meeting
class Meeting:
def __init__(self, title, date, attendees):
self.title = title
self.date = date
self.attendees = attendees
def save_to_drive(self, drive_service):
file_metadata = {'name': f'{self.title}.txt'}
file_content = f'{self.title},{self.date},{','.join(self.attendees)}'
# Code to save to Drive would go here
What do you think? Is this a viable solution or should I look elsewhere?
I’ve been down this road before, and I’d caution against using Google Drive as a database substitute. While it might seem convenient, it’s not optimized for frequent read/write operations or complex queries you’ll likely need as your app grows.
From my experience, Firebase is actually more cost-effective in the long run. It handles user authentication, real-time updates, and data security out of the box, saving you tons of development time. Plus, its free tier is quite generous for starting out.
If you’re set on a file-based system, consider something like SQLite with proper encryption. It’s lightweight, doesn’t require a server, and can be easily synced with cloud storage solutions if needed. This approach gives you more control and better performance than trying to shoehorn Google Drive into a database role.
Remember, choosing the right data storage solution early can save you major headaches down the line. Don’t let the initial simplicity of Drive lure you into a architecture that won’t scale well.
I’ve experimented with Google Drive for app data storage, and while it’s tempting, I wouldn’t recommend it for your use case. The app folder feature isn’t designed for database-like operations, and you’ll likely run into performance and scalability issues as your user base grows.
Firebase is actually a more suitable option here. It’s specifically built for app data and offers real-time synchronization, user authentication, and fine-grained security rules out of the box. The pricing is competitive for most apps, and it scales well.
If cost is a major concern, consider alternatives like MongoDB Atlas (which has a free tier) or even a simple SQL database with proper access controls. These options will give you more flexibility and better performance in the long run compared to jury-rigging Google Drive as a database.
google drive isnt great for database stuff, trust me. I tried it and it was a mess. firebase is way better for what ur trying to do. it handles user auth and data sync really well. plus, its not as expensive as you might think for small to medium apps. give it a shot, you’ll probably like it better than messing with drive.