> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/big-data-and-tools-with-nosql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/big-data-and-tools-with-nosql/data-format/storage-formats.md).

# Storage Formats

| Account number | Last name | First name | Purchase (in dollars) |
| -------------- | --------- | ---------- | --------------------- |
| 1001           | Green     | Rachel     | 20.12                 |
| 1002           | Geller    | Ross       | 12.25                 |
| 1003           | Bing      | Chandler   | 45.25                 |

### Row Oriented Storage

In a row-oriented DBMS, the data would be stored as

1001,Green,Rachel,20.12;1002,Geller,Ross,12.25;1003,Bing,Chandler,45.25

Best suited for OLTP - Transaction data.

### Columnar Oriented Storage

1001,1002,1003;Green,Geller,Bing;Rachel,Ross,Chandler;20.12,12.25,45.25

Best suited for OLAP - Analytical data.

1. **Compression**: Since the data in a column tends to be of the same type (e.g., all integers, all strings), and often similar values, it can be compressed much more effectively than row-based data.
2. **Query Performance**: Queries that only access a subset of columns can read just the data they need, reducing disk I/O and significantly speeding up query execution.
3. **Analytic Processing**: Columnar storage is well-suited for analytical queries and data warehousing, which often involve complex calculations over large amounts of data. Since these queries often only affect a subset of the columns in a table, columnar storage can lead to significant performance improvements.

<figure><img src="/files/aF3B3JeZvsfb6qtd9ja2" alt=""><figcaption><p><a href="https://mariadb.com/resources/blog/why-is-columnstore-important/">https://mariadb.com/resources/blog/why-is-columnstore-important/</a></p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/big-data-and-tools-with-nosql/data-format/storage-formats.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
