Explain By Example: OLTP vs. OLAP

Michelle Xie
6 min readJan 29, 2020

I remember in my first semester of university, I came across ‘OLTP’ and ‘OLAP’ in my Information Systems course. I read the textbook definition and didn’t understand it. But rather than asking my professors about it, I memorized the definitions and prayed that it wouldn’t come up in the exams. A couple of years down the road, I came across it again and thought, “Maybe its time I tried to learn the differences” and what better way to do this than explain it to myself with an example. So here we go…

Let’s go back to school:

This school contains students, teachers, and the principal. The school also interacts with parents. This school puts all their data into a single database. The students data, the teachers data, and the courses data all goes into the same database.

If you don’t know what a database is, it’s essentially a place that stores data in some sort of structured way. Think of a telephone book for example. If you have ever used a telephone book, you would know that a telephone book stores contact details (the data) in an alphabetical ordering (structured format). Except with this telephone book, you can make changes to it (cross out numbers and update it), you can add to it (add new contacts in), you can even remove some of the contact details (by ripping the pages out).

--

--

Michelle Xie

I like to write (and it turns out, not just code)! I am currently the creator and author of the ‘Explain by Example’ series and the ‘bad ideas’ blog.