← Valon Mortgage Interview Insights

Valon Mortgage·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Valon Mortgage gave me a coding round that was basically 'build a tiny in-memory database from scratch.' One question, but it sprawled in every direction once I started implementing it.

Questions Asked (1)

Q1

Design and implement a simplified in-memory database that supports INSERT, SELECT with column projection, WHERE filtering, and ORDER BY on a single fixed-schema table.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

I started with the insert and select logic pretty confidently, but the WHERE clause is where things got messy.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., data types, concurrency, memory limits), then propose a simple in-memory table structure (e.g., array of rows or columnar store) and outline the core operations. Implement each operation with clear separation of concerns: parsing, filtering, projection, sorting, and output formatting, while discussing trade-offs and potential optimizations.

Pro tip: Demonstrate awareness of real-world constraints by mentioning that a fixed schema allows pre-validation and type enforcement, and that sorting can be optimized with indexes or by leveraging stable sort algorithms. Also, discuss how you would handle edge cases like nulls, empty results, and invalid queries.

1. Clarify Requirements and Constraints

Ask questions to understand the expected scale, data types, query complexity, and performance requirements. Confirm whether concurrency, persistence, or transactions are needed.

2. Design Data Structures

Choose an in-memory representation for the table, such as a list of rows (each row a struct/object) or a columnar store. Define how to store schema metadata and enforce types.

3. Implement Core Operations

Break down each operation: INSERT validates and appends a row; SELECT applies WHERE filter, then projects columns, then sorts by ORDER BY. Use helper functions for filtering and sorting.

4. Optimize and Handle Edge Cases

Discuss potential optimizations like indexing for WHERE or ORDER BY, and handle edge cases such as null values, empty tables, and invalid column references.

5. Test and Validate

Outline a testing strategy: unit tests for each operation, integration tests for combined queries, and performance tests for large datasets.

Key Points to Mention

  • Choice of data structure (row-oriented vs column-oriented) and its impact on performance
  • Query execution pipeline: parse -> filter -> project -> sort -> format
  • Handling of data types and schema validation on INSERT
  • Sorting algorithms (e.g., stable sort) and potential use of indexes for ORDER BY
  • Edge cases: nulls, empty results, invalid queries, and error handling
  • Trade-offs between simplicity and performance, and potential future extensions (e.g., indexing, concurrency)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.