Tagged articles
PreparedStatement
15 articles · Page 1 of 1
SQL injection lets attackers turn simple input fields into destructive commands that can delete or compromise databases; the article explains how string‑concatenated queries become vulnerable, demonstrates the attack step‑by‑step, and shows how parameterized queries via PreparedStatement and MyBatis’ #{ } syntax, plus defense‑in‑depth measures, effectively mitigate the risk.
Database SecurityMyBatisParameterized Query
0 likes · 10 min read

The article dissects MyBatis' mechanisms for preventing SQL injection, compares the safe #{ } syntax with the risky ${ } syntax, explains the underlying PreparedStatement workflow, and provides concrete best‑practice guidelines and code examples for secure usage.
MyBatisParameter BindingPreparedStatement
0 likes · 22 min read

An unexpected data loss issue in a ShardingSphere‑JDBC setup was traced to Druid’s poolPreparedStatements cache, which reuses PreparedStatement objects across different shards, bypassing dynamic routing; disabling the cache or switching to HikariCP restores correct sharding behavior with minimal performance impact.
DruidPerformance TuningPreparedStatement
0 likes · 12 min read

This guide explains how to set up JDBC drivers, construct connection URLs, use PreparedStatement instead of Statement, iterate ResultSet safely, manage resources with try‑with‑resources, handle transactions, employ connection pools, and properly process SQLExceptions for robust Java database applications.
JDBCJavaPreparedStatement
0 likes · 15 min read

This guide explains how to enable row store, configure short query path, and use PreparedStatement in Doris to reduce I/O and CPU overhead for high‑concurrency primary‑key point queries, including DDL examples, JDBC usage, row cache settings, performance tips, and verification methods.
DorisPreparedStatementRow Store
0 likes · 9 min read

The article explains Java's PreparedStatement interface, highlighting its performance, security, and batch processing benefits, and provides a complete example of inserting multiple user records efficiently, while also discussing practical considerations such as batch size, transaction handling, error management, and optimization tips.
Database PerformanceJDBCJava
0 likes · 6 min read

This article explains what SQL injection is, demonstrates a vulnerable example, and presents four practical defenses for Java applications—including PreparedStatement, MyBatis #{} placeholders, request‑parameter filtering, and Nginx reverse‑proxy rules—complete with code snippets and configuration details.
JavaMyBatisPreparedStatement
0 likes · 8 min read

SQL injection is a critical web security flaw where unsanitized user input can alter database queries, and this article explains its mechanics, demonstrates vulnerable Java code, and outlines four prevention methods—PreparedStatement, MyBatis #{}, request parameter filtering, and Nginx reverse‑proxy rules—complete with code examples.
JavaMyBatisNGINX
0 likes · 9 min read


HomeTechAug 4, 2022 · Information Security
This article explains the fundamentals of SQL injection attacks, outlines their severe consequences, and provides a comprehensive set of prevention principles and practical measures—including parameterized queries, strong typing, input validation, and secure MyBatis configurations—to help developers safeguard backend applications and databases.
MyBatisPreparedStatementSQL injection
0 likes · 10 min read

This article explains how MyBatis' ${} and #{} placeholders differ in syntax substitution and security, demonstrates their usage with DAO interfaces, Mapper XML, and JUnit tests, analyzes SQL injection risks, shows the underlying PreparedStatement handling, and provides practical guidelines for when to use each placeholder.
JavaMyBatisORM
0 likes · 11 min read

The article explains why multithreaded inserts can be faster than single‑threaded ones in MySQL, breaks down the time spent on each step of an insert operation, and presents practical techniques such as using PreparedStatement, multi‑value INSERT statements, and transaction batching to dramatically reduce insertion time.
Batch TransactionInsert PerformanceMultithreading
0 likes · 6 min read

This article explains why multithreaded inserts into a single MySQL table can be faster than single-threaded inserts, analyzes the time distribution of insertion operations, and presents techniques such as prepared statements, multi-value inserts, batch execution, and transaction batching to significantly improve insert throughput.
Insert OptimizationMultithreadingMySQL
0 likes · 6 min read

This article provides a comprehensive guide to JDBC, covering its definition, core interfaces (Connection, Statement, ResultSet), the advantages of PreparedStatement, the need for connection pools, pagination techniques for Oracle and MySQL, and practical usage of DBUtils with full code examples.
DBUtilsJDBCJava
0 likes · 10 min read

This article explains how to accelerate MySQL data insertion by using multithreaded inserts for single and multiple tables, prepared statements, batch execution, multi-value SQL, and transaction commits, providing detailed code examples and performance analysis.
BatchInsertMultithreadingMySQL
0 likes · 6 min read

This article explains how multithreaded inserts, prepared statements, multi‑value SQL, and batch transaction commits can dramatically improve MySQL insert performance by reducing connection overhead, parsing time, and network I/O, achieving insertion of 100 000 rows in roughly ten seconds.
MultithreadingMySQLPreparedStatement
0 likes · 5 min read
