Skip to main content

Database

Modern Java Testing: JUnit 6 + AssertJ + Mockito 5 + Testcontainers

A practical guide to the modern Java test stack — JUnit 6 as the runner, AssertJ for fluent assertions, Mockito 5 for mocking, and Testcontainers for real infrastructure. Includes runnable examples for each and AI prompts to generate and refactor tests.

Database Testing in JUnit 6: H2 vs Real DB vs Containers

A practical comparison of H2 in-memory, shared real database, and Testcontainers for database testing in JUnit 6 projects. Includes code examples for all three approaches, trade-off analysis, and a decision guide for choosing the right strategy per scenario.

JUnit 6 with Testcontainers: Real Database Integration Testing

A complete guide to using Testcontainers with JUnit 6 for real database integration testing. Covers PostgreSQL container setup, Spring Boot @DynamicPropertySource integration, singleton pattern for performance, multi-service containers, and CI/CD pipeline compatibility.

Creating A Simple Database Application In Visual Studio ’10 (Drag & Drop Way)

Note: This post was written in 2012 for Visual Studio 2010. The .sdf (SQL Server Compact) format used here has since been discontinued by Microsoft and is no longer supported in modern Visual Studio versions. If you're starting fresh today, consider SQLite, LocalDB, or SQL Server Express instead. There are already thousands of tutorials on the web for this kind of thing, and most of them are unnecessarily complicated. They use too many columns and too much code, which just ends up confusing beginners. So I'm going to show you how to build your first database VB app the simple way — three columns only (ID, Name, City), and almost everything done through drag and drop. No heavy coding needed. Steps Since we're building a Windows Forms application, choose Windows Forms Application as the project template. I've named the project dbapp, but you can call it whatever you like.

Starting With Oracle SQL

Note: I wrote this guide back in 2012 for Oracle SQL Express Edition 11g. While the command prompt steps are still valid for Oracle databases, the specific software versions and setup screens will look completely different today! Today, I'm going to show you how to connect to and interact with Oracle SQL directly from your Windows command prompt. You might be wondering why we don't just use the built-in Run SQL Command Line tool from the Start menu. The big issue with that tool is that it doesn't support basic copy and paste functionality—something that developers like you and me desperately need! So, let's look at how to properly connect to your database using the trusty standard command prompt. First things first, you'll need to have Oracle SQL installed on your PC. If you don't have it yet, you can grab it right here: Download Oracle SQL Express Edition 11g Oracle SQL Express is completely free to use, but Oracle does require you to log in before downloading. If you don't have an account, just hit the sign-up button—it's free and only takes a minute. The download is fairly hefty at around 350MB. Once it's finished, extract the ZIP file and run setup.exe. The installation wizard is pretty standard. If you've installed Windows software before, you can safely just click "Next" through most of the prompts. During the setup process, you'll eventually hit a screen that looks like this: This is an important step. You're being asked to set the password for the SYS and SYSTEM users. In Oracle, these are your master administrative accounts. If you're just setting this up on your local machine for development and learning, I highly recommend using a simple password like admin. It's easy to remember and quick to type. Of course, you can use whatever password you prefer. Once you've typed it in, click Next. The installer will now begin copying files and setting up your database. Just sit back and wait for it to finish.