Skip to main content

22 posts tagged with "database"

database tag description

View All Tags

Exporting Python Barcode Scan Data to CSV and Excel

· 4 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Exporting your scan data is the final piece of the puzzle. While a database is great for storage, most team members prefer to see results in a spreadsheet.

In Python, the pandas library is the gold standard for this. It can read directly from your SQLite database and convert that data into a professional-looking Excel or CSV file in just a few lines of code.

Integrating Python Barcode Scanners with a Database

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Connecting your scanner to a database transforms a simple visual tool into a functional Inventory Management or Attendance System. In this walkthrough, we will use SQLite because it is built into Python, requires no external server setup, and is perfect for edge devices like a Raspberry Pi or a local laptop.

Python Typeguard Performance Considerations for Database I/O Wrappers

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

When implementing runtime checks like Typeguard, the primary concern is the performance overhead it adds to production code, especially in high-throughput applications that rely on fast I/O operations (like database queries).

The short answer is: Typeguard adds a measurable execution overhead, but it is often negligible compared to the time spent on I/O (Database operations).

Here is a breakdown of the performance implications and when you should be concerned.

SQLAlchemy joinedload vs. join()

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

In SQLAlchemy, both the relationship loading option (.options(joinedload(...))) and the query builder method (.join(TableClass)) result in a SQL JOIN clause. However, they serve fundamentally different purposes and lead to distinct results in the ORM (Object Relational Mapper) layer.

Understanding this difference is crucial for avoiding the common "N+1 problem" and correctly shaping the data returned by your queries.

SQLAlchemy Relationships Without Database Foreign Keys

· 7 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

This pattern is often used for:

  1. Legacy Databases: Working with existing schemas that lack proper constraints.
  2. Performance: Avoiding the overhead of transactional foreign key checks.
  3. Data Warehousing: Dealing with schemas where relationships are semantic, not structural.

The key to achieving this is the relationship() function combined with the primaryjoin argument. This allows SQLAlchemy to define the join condition required for the relationship, enabling essential features like eager loading (joinedload, selectinload).

Supabase Pitfalls: Avoid These Common Mistakes for a Robust Backend

· 13 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Supabase Pitfalls: Avoid These Common Mistakes for a Robust Backend

Supabase offers a powerful open-source alternative to Firebase, built around PostgreSQL. Its ease of use makes it a favorite for rapid development, but this very convenience can lead developers down paths that introduce technical debt, performance bottlenecks, and security vulnerabilities. Understanding and avoiding these common pitfalls is crucial for building a robust and scalable application.

Vercel migrations

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Vercel doesn't have a single, built-in migration system but instead relies on standard, database-specific tools. For relational databases like Vercel Postgres, you use traditional ORMs or migration libraries. For key-value stores like Vercel KV, migration is typically a manual process of data transformation.

Vercel Database Integration Overview and Recommendations

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Vercel Database Integration Overview and Recommendations

Vercel provides a streamlined way to integrate databases into your projects, focusing on a serverless and edge-centric approach. Instead of a single database, Vercel offers a suite of storage solutions, each optimized for different use cases. The integration process is designed to be seamless, with first-class support for a range of serverless databases [1].

Use this Instead of SQlite on Vercel

· 5 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Is SQLite Supported on Vercel? 💾

No, SQLite is not officially supported by Vercel for production applications because of its reliance on the local filesystem. Vercel's serverless functions are stateless and run in a read-only environment, meaning any changes to the local filesystem are discarded after the function's execution. This makes it impossible to persist the SQLite database file between function invocations. Vercel source

While you might be able to get a read-only SQLite database to work by including the database file in your deployment bundle, any attempt to write to it will fail. This limitation makes SQLite unsuitable for most dynamic web applications on the Vercel platform.

Vercel Database Options and Solutions

· 6 min read
Serhii Hrekov
software engineer, creator, artist, programmer, projects founder

Vercel Database Options: A Comprehensive Guide 🗃️

Vercel provides a suite of data storage solutions designed to complement its serverless and edge-first architecture. Instead of a single "Vercel Database," you get a selection of tools, each optimized for a specific use case. This allows you to choose the right database for the job, whether it's a simple key-value store or a full relational database.