Hello, my name is Julian Puffer. Recently, I started work in menu inc.’s User backend team. Last year, I graduated from the University of California, Irvine. California has been my home for my whole life, so Japan is still very new to me (more on that later).
My article will be about the database portion of the engineering training.
Table of Contents
- Training Purpose
- Relational Databases (RDBs)
- SQL overview
- SQL Hands-on
- Brief intro to NoSQL
- Brief intro to NewSQL
- Conclusion
- Regarding English in Reazon Holdings
- Recruitment information
Training Purpose
Reazon has many subsidiaries, projects, and teams. But despite the differences between projects, most of them involve server-side technology, including databases.
Because of this, the DB topic was taught to both web and game engineers as one of the first fundamentals (alongside Git, Shell/OS, etc.).
The training first started by establishing the importance of DBs, by answering questions such as “what happens without databases?”, “what happens if they’re not reliable?”, etc.
For example, without databases, data might be stored in raw text files. But with that, comes a likelihood of format inconsistencies, difficult insertion and deletion, etc.
These scenarios can significantly hurt users, especially when dealing with sensitive information (such as passwords and payment data). But all kinds of data can also be considered sensitive (or valuable) to users, so the value of good data management is immense.
Relational Databases (RDBs)
The introduction of RDBs included a few of their most important characteristics:
- Entities – some object, tangible or not
- Represented by “Tables”, which have:
- Columns (for an entity’s attributes)
- Rows (for each instance of an entity)
- Primary Keys (PK) – an important unique identifier of each entity instance
- For example, a student ID number
- Usually, but not always needed in a table
- Represented by “Tables”, which have:
- Relations – relationships between entities
- Generally implemented with Foreign Keys (FK) – a way to connect one table’s Primary Key with another table
- For example, the student ID column appears in a Course_Enrollments table, to link each enrollment to a specific student
- Generally implemented with Foreign Keys (FK) – a way to connect one table’s Primary Key with another table
- (This image includes example data for visualization purposes)
- SQL
- Language for interacting with RDBs, allowing for data retrieval, manipulation, and definition
- Transactions
- Defined as a series of operations in a single lump sum, to do some ‘task’
- For example, a single purchase on a shopping website
- This isn’t one action, but can be broken down into at least two database operations:
- INSERT: A new row is added to the orders table to record your purchase
- UPDATE: The stock count for the item you bought is reduced in the inventory table
- This isn’t one action, but can be broken down into at least two database operations:
- To ensure DB reliability, transactions are either “committed” (finalized), or “rolled back” (undoing without committing, especially in the event of some error/failure)
- RDB transactions follow the ACID property
- A: “Atomicity” – All parts of a transaction succeed, or the entire transaction is rolled back. All or nothing
- C: “Consistency” – The database remains in a valid state before and after the transaction
- I: “Isolation” – Concurrent transactions don’t interfere with each other
- D: “Durability” – Committed transactions are permanent, even if the system fails
And to enhance learning, the training program (not just this DB portion) implemented learning-by-doing via “hands-on” exercises.
The first hands-on for DB training, was a team exercise for designing an Entity-Relationship Diagram (ERD) for one of menu inc.’s newest features, the Online Crane Game (OCG). Most of us didn’t know about it yet, so it was a thought-provoking exercise, with varying answers between teams.
- Typical ERD’s may have the following format (though varying in scale):
- (This image includes example data for visualization purposes)
- Image source: Reazon Holdings
SQL overview
We went over some SQL syntax, organized by statement types (DDL, DML, DQL, TCL).
Syntax keywords are capitalized.
- DDL (Data Definition Language)
- Defining and managing tables themselves
- CREATE, ALTER, DROP
- DML (Data Manipulation Language)
- Adding, modifying, and removing data from tables
- INSERT, UPDATE, DELETE
- DQL (Data Query Language)
- For querying the database to retrieve data
- SELECT, FROM, WHERE
- JOIN – combines columns from different tables
- UNION – combines rows from different tables
- GROUP BY – groups data based on data from columns
- ORDER BY – sorts based on criteria
- DISTINCT – eliminates duplicates from the result
- TCL (Transaction Control Language)
- Manages transaction boundaries to enforce ACID, by:
- Rolling back to the state before an error occurred
- Exposing only committed data in the database
- BEGIN – Starts transaction
- COMMIT – Reflects changes
- ROLLBACK – Returns to the state before BEGIN
- SAVEPOINT – State can be specified (and returned to) later
- Manages transaction boundaries to enforce ACID, by:
In addition, we learned about subqueries, which is a query nested inside a larger query. We learned how subqueries can be used in WHERE, FROM, and SELECT clauses to perform more complex data retrieval and filtering operations. For example, you can use a subquery to find all employees who work in a specific department, where the department’s ID is retrieved by the subquery.
SQL Hands-On
Using MySQL, this exercise had us apply SQL to an example e-commerce model/scenario. Given an ERD and various table designs, we practiced:
- Joining multiple tables:
- We frequently used JOIN to combine data from tables like items, shops, and orders to create meaningful reports
- Summarizing data with aggregate functions:
- We used functions like COUNT and SUM with GROUP BY to answer business questions, such as finding the total number of items sold by each shop
- Writing complex subqueries:
- The later problems required using subqueries in WHERE and FROM clauses to perform advanced filtering, such as finding all items with a price higher than the overall average price
Lastly, some content about DB performance was introduced.
- Indexes
- A ‘table of contents’ for a database table that drastically speeds up data retrieval
- Order of SQL statement execution
- SQL clauses run in a different logical order than they are written (for example, FROM/WHERE run before SELECT), which affects how queries perform
- The EXPLAIN statement in SQL
- A command that reveals the database’s “execution plan” to diagnose slow queries and see if indexes are being used
- “N+1” concept
- A common performance issue, where the code makes many small queries instead of one efficient JOIN query to get all the data it needs
Brief intro to NoSQL
Non-relational DBs were also introduced. There are various types of them, one major group falling under the “NoSQL” category.
In the case of “NoSQL”:
- Instead of Tables/Rows/Columns, some NoSQL implementations come in the form of:
- Documents within Collections
- Collection – a container for related data. For example, you would have a users collection or a products collection
- Document – a single record inside a collection. It holds the data for one item, usually in a flexible format, such as JSON
- Key-value stores: similar to a dictionary, for fast lookups
- Documents within Collections
- NoSQL follows BASE (not an opposite to ACID):
- BA: “Basically Available” – The system is guaranteed to be available. But at the expense of consistency. Lower “consistency” here means that reflected data might not always be the most up-to-date.
- S: “Soft state” – The state of the system may change over time, even without input
- E: “Eventually consistent” – The system will become consistent over time, given that the system doesn’t receive input during that time
- (This image includes example data for visualization purposes)
Brief intro to NewSQL
Lastly, NewSQL was briefly introduced. It’s a newer combination of some of SQL and NoSQL’s strengths (for example, RDB’s integrity of transactions and NoSQL’s scalability). One of the DBMS for it, is TiDB by PingCap.
- Image source: Reazon Holdings (translated)
What also makes NewSQL and TiDB unique, is that Reazon is not only using it in its projects, but also has a relationship with TiDB’s developer (PingCap). This is one example of Reazon’s growing presence in the tech scene.
https://pingcap.co.jp/case-study/menu/
https://pingcap.co.jp/case-study/dmm-menu-micoworks/
Conclusion
This database training provided a solid foundation in both the theoretical concepts and practical applications of databases.
We started with the “why” behind databases, understanding their importance in modern applications. From there, we went into the specifics of relational and non-relational models, learning about their respective strengths and use cases.
The hands-on SQL exercises were particularly valuable, allowing us to apply our knowledge to potential real-world scenarios. Then, the discussion on performance optimization (such as indexes and the N+1 problem) gave us insights into writing more efficient and scalable database code.
Finally, NoSQL and NewSQL were introduced to help broaden our knowledge, and let us know what’s out there. It’s helpful to know alternatives to one kind of technology. After all, tradeoffs are a frequent aspect of software, and there is often more than 1 solution to a problem.
Regarding English in Reazon Holdings
(The following includes opinions of my own, and are not the company’s).
I’d like to briefly touch on the helpful English presence during training, as well as Reazon’s approach to this subject as a whole.
I started living in Japan for the first time in March 2025, 1 month before joining the company. Japan is different in many ways, but I think that Reazon’s positive and supportive environment has made it easier to gradually adjust to life here.
One way it did that, is by providing some English-speaking engineers during the training program. One of them even ended up as my second mentor, so it was the start of one (out of many) great relationships I’ve started to build.
From my limited understanding, Reazon is gradually trying to build an overseas presence. Currently, there’s still lots of progress to make, and Japanese is still used throughout most of the activities in the Yotsuya branch. But I hope to contribute to the overseas expansion moving forward.
▼採用情報 – Recruitment Information
レアゾン・ホールディングスは、「世界一の企業へ」というビジョンを掲げ、「新しい”当たり前”を作り続ける」というミッションを推進しています。
現在、エンジニア採用を積極的に行っておりますので、ご興味をお持ちいただけましたら、ぜひ下記リンクからご応募ください。
Reazon Holdings has the vision of becoming “the world’s best company” and is pursuing the mission of “continuing to create new ‘norms’.”
The company is actively recruiting engineers, so if you are interested, please apply using the link below.
Views: 0