What is a row-type database and what is a column database

Source: Internet
Author: User

The database stores data in the form of a two-dimensional table of rows and columns. However, it is stored as a one-dimensional string. Scale as in the following table:

EmpId Lastname Firstname Salary
1 Smith Joe 40000
2 Jones Mary 50000
3 Johnson Cathy 44000

This simple table contains the employee code (EMPID), the Name field (Lastname and Firstname), and the salary (Salary).

This table is stored in the computer's memory (RAM) and storage (hard disk). Although the memory and the hard disk are different in mechanism, the computer's operating system is stored in the same way. The database must store the two-dimensional table in a series of one-dimensional "bytes" that are written by the operating system to memory or hard disk.

The row database stores the data values in a row together, and then stores the next row of data. And so on

      1,smith,joe,40000;      2,jones,mary,50000;      3,johnson,cathy,44000;



A column database stores the data values in a column together , then stores the next column of data, and so on.

      ;      Smith,jones,johnson;      Joe,mary,cathy;      40000,50000,44000;

This is just a simplified statement.


In the relational database domain, except the traditional Oracle, SQL Server, MySQL and other row-type database. There is a growing interest in the Data Warehouse-listed database.



Two-control1 rows are more suitable for OLTP, querying all columns of a record.

columns are more suitable for OLAP, and are ideal for use in data warehousing, such as data analytics, mass storage, and business intelligence. the numbers that are not often updated are involved . because of the difference in design. A column database has advantages over parallel query processing and compression. And the data is listed as cell storage, completely without considering data modeling or modeling is simpler. To query the data on which columns are computed, read the columns directly.


2 column in the storage area occupies a very large advantage, can effectively improve the data compression ratio, save storage space.


What is a row-type database and what is a column database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.