🚀 Built a Mini SQL Query Engine in Java (from scratch) To truly understand how SQL works internally/in backend , I built a lightweight SQL-like engine using Java with Excel (.xlsx) as persistent storage. 🔹 Implemented core queries: INSERT, SELECT, SELECT with WHERE, and DELETE 🔹 Designed a basic query parser using string tokenization & substring logic 🔹 Simulated table scanning and conditional filtering similar to real database engines 🔹 Used Apache POI to handle file-based storage This project helped me deeply understand how SQL queries are parsed and executed behind the scenes, rather than just using them at a surface level. Always fun to learn systems by building them 🚀 #Java #SQL #BackendDevelopment #LearningByBuilding #ApachePOI #Databases #ComputerScience
More Relevant Posts
-
Intrigued by how Spring Data JPA internally executes the pattern based search with the derived query strategy. Both do the '%' based search but, The Like() gives us the responsibility to add the wildcard '%' in however way we want, Where as the containingIgnoreCase() adds the '%' automatically and does upper(column value) against upper(incoming user value) making it very specific and less-error prone. #SpringDataJPA #Hibernate #SQL #CleanCode #Java
To view or add a comment, sign in
-
-
🧠 Strengthening SQL & String Fundamentals (Java) Today’s session focused on structured database querying and core string problem-solving. 🗄 SQL Practice • 3 SELECT + WHERE queries for precise filtering • 2 GROUP BY queries for aggregation • 1 ORDER BY query for controlled result sorting Practicing these together reinforced how real backend APIs depend on accurate filtering, grouping, and ordered data retrieval. Query clarity directly impacts performance and response quality. 🧩 DSA – String Basics (Java) Worked on: • Finding string length • Reversing a string • Counting vowels • Checking palindrome • Counting character frequency These problems strengthened traversal patterns (O(n)), condition-based checks, and character manipulation — all foundational for more advanced algorithmic challenges. I’m noticing that combining database logic with core programming logic builds layered thinking — data handling + algorithmic reasoning together. Improving fundamentals across layers, one focused session at a time. #Java #SQL #DSA #BackendDevelopment #LearningInPublic #Consistency
To view or add a comment, sign in
-
Understanding N+1 Problem in JPA (Simple Explanation) While working with Java Persistence API, one common performance issue developers face is the N+1 problem. 👉 It happens when: 1 query is used to fetch main data N additional queries are executed to fetch related data 💡 Example: You fetch 10 users → 1 query Each user has orders → 10 more queries 👉 Total = 11 queries (1 + N) This leads to unnecessary database calls and slows down the application ⚠️ ✅ How to fix it: Use JOIN FETCH in JPQL Use EntityGraph (Spring Data JPA) Apply Batch fetching (@BatchSize) Use DTO projections for optimized data 🎯 Interview Tip: “N+1 problem occurs when multiple queries are executed for related data instead of a single optimized query, impacting performance.” #Java #SpringBoot #JPA #Hibernate #BackendDevelopment #PerformanceOptimization 👉 Follow me for more such simple backend concepts
To view or add a comment, sign in
-
Writing an ORM over SQL is like writing Java to generate TypeScript — why are you complicating the obvious? #SQL #RawQuery #DataOriented #CleanCode #StopTheAbstraction
To view or add a comment, sign in
-
-
In this video, I demonstrate how to create a bar graph in a Java report using JasperReports. The example groups patient ages and visualizes the data to show how reporting tools can transform raw data into meaningful insights. #Java #JasperReports #DataVisualization #SoftwareDevelopment #ReportingTools
To view or add a comment, sign in
-
#Day_52_of_my_DSA_Journey (mission: abki bar string, array par) *I explored Linked Lists today and learned a key concept: we create a self-defined data type called Node to build the structure. ✅What I Learned: **Linked List vs Array: ->Arrays have fixed size and store elements in contiguous memory. ->Linked Lists have dynamic size and store nodes in non-contiguous memory, connected via references. **Node in Java: ->Each node stores ‘data’ and a ‘reference to the next node’. ->We define it ourselves as a ‘custom data type’ to create the list. ✅Real-Life Applications: ->Stacks & Queues (underlying data structure). ->Browser History → Back & Forward functionality. 💡 Learning in Action: ->Created the first Node from an array element. ->Printed the memory reference to see where it’s stored. ->Accessed the data inside the node using y.data. **Key Insight: Building a self-defined Node class is the foundation of linked lists. Once you have nodes, you can link them together to form a complete list and perform operations like traversal, insertion, and deletion.
To view or add a comment, sign in
-
-
Choosing between JSON documents or a well-modeled relational schema? Why not both 😁 In my latest article "Hands-on CRUD with JDBC and JSON Relational Duality Views”, you'll get to try Oracle AI Database's JSON document API for relational tables - keeping normalization, atomicity, and transactional guarantees with flexible JSON schemas. 👉 Read the article here: https://lnkd.in/gY8Jar6J TL;DR: - Model data once (normal relational tables) - Expose that data as a JSON document through a JSON Relational Duality View - Sample Java app does CRUD against the JSON document via plain JDBC. - The database keeps the underlying relational tables transactionally in sync, no client-side joins or glue. If you try it, let me know your thoughts 🔥
To view or add a comment, sign in
-
-
🔄 From Native Query to JPQL with FUNCTION() Before (Native Query): @Query(value = """ SELECT * FROM users WHERE JSON_CONTAINS(roles, :role) """, nativeQuery = true) List<User> findByRoleNative(String role); ❌ No error if property updated After (JPQL with FUNCTION): @Query(""" SELECT u FROM User u WHERE FUNCTION('JSON_CONTAINS', u.roles, :role) = 1 """) List<User> findByRole(String role); ✅ Error if property updated Same DB function call, but now you get: - Pagination support 📦 - Type safety 🔒 - Cleaner code ✨ Keep your JPQL benefits while using any database function! #SpringData #JPA #Java #CodingTips
To view or add a comment, sign in
-
Sharing a demo of my Java JDBC implementation. The program connects to a MySQL database and dynamically reads the table schema. It executes the "DESC users" query, processes the ResultSet, and prints column names with their datatypes automatically — without hardcoding any fields. The attached video shows the schema being read directly from the database in real time. This helped me understand how applications inspect database structure before performing operations. Tech Stack: Java, JDBC, MySQL, SQL #Java #JDBC #MySQL #SQL #DatabaseConnectivity #ResultSet #BackendBasics #Programming #ComputerScience #LearningByDoing #GFG #JavaNationalSkillUp
To view or add a comment, sign in
-
📚 Exploring JDBC — Understanding ResultSet in Java Today I explored JDBC ResultSet in Java and finally understood how Java actually reads data from a database, not just connects to it 💻🗄️ I built a small program where Java connects to MySQL, runs a SELECT query, and prints the record on the console. While doing this, I got clarity on the complete flow of database interaction: 1. Loading the MySQL driver 🔌 2. Creating a connection using DriverManager 🌐 3. Creating a Statement object 🧠 4. Executing the query ▶️ 5. Fetching data using ResultSet 📄 6. Extracting column values using getInt() and getString() 🔍 7. Closing the connection properly 🔒 The biggest learning was understanding how ResultSet works like a cursor 📍 It does not immediately give all records. Instead, it points to one row at a time. Only after calling next() does the cursor move to the first row and allow data access. Without it, no data can be read. So internally the flow becomes: Database Table → SQL Query → ResultSet Cursor → Java Variables → Console Output ⚙️ This small exercise helped me clearly visualize how backend applications actually fetch and process data from databases 🚀 Github link: https://lnkd.in/gask2mmb Special thanks to Prasoon Bidua sir for amazing guidance. #Java #JDBC #MySQL #BackendDevelopment #LearningInPublic
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development