Parse sharphsql source code

Source: Internet
Author: User

 

To study memory databases, we began to analyze some open source databases.

 

Basically, this database is rubbish. Compared with the SQLite architecture, this is a waste! There is no scalability, chaotic internal structure, and performance cannot be evaluated.

 

The basic structure is as follows:

 

The core module is table, and others are simple. Of course, there is also SQL analysis.

 

The data is permanently stored in files, loaded into table data tables through logs, and saved in the cache. Use one-way list node storage.

 

Column stores the table structure. Others are some index constraints.

 

These classes are basically used for queries."Mixed" + "Chaotic"Operation.

 

For example, after SQL parsing by sqlparser, various expressions + tablefilter are obtained. In this case, table is introduced into tablefilter.

Then, tablefilter and expression are mixed in a chaotic round. The table data is filtered and the returned object of select is obtained.

Select then assemble various result. Record and return it to the user.

 

------------

 

In terms of architecture, it is basically a mess.

Table and database are mutually dependent

Table and cache and row are mutually dependent.

Then index and constraint are mutually dependent on table and row, basicallyMessy !!!!

The entire database runs through index, table, parser, constraint, and expression.

 

I don't know how much IQ such an American man has! If rewrite is required, it is estimated that the entire hsql should be overturned.

 

SQLite has its own characteristics, such as SQLite Virtual Machine vdbe, which isolates SQL and data storage at once, at least 50% simpler than hsql.

 

The IQ of such waste is really doubtful !!!!

 

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.