GithubHelp home page GithubHelp logo

databaseengine_index_project's Introduction

Database Engine with BPtrees and RTrees Indices Support

File Structure

General Description of What the DBEngine Supports

  • Metadata about each table [Table name, Column names, Column Types, Clustering Key, Indexed Columns] are saved in the metadata.csv file.
  • Data for each table are inserted into serialized pages in the data/ folder which can store a pre-defined number of tuple according to the DBApp.properties file.
  • Data for each table is sorted by the clustering key.

General Description of What the BPtree Index Supports

  • BPTree created on a table column saves the values for this column in its leaves.
  • The BPTree and nodes [Non-leaf, Leaf] are serialized in the data/ folder.
  • Duplicates for a certain value are stored in overflow pages which are also serialized in the data/ folder.

General Description of What the Rtree Index Supports

  • RTree created on a table column saves the areas for this column polygons in its leaves.
    • However, in update and delete methods, the search is done using the coordinates as well as the area.
  • The RTree and nodes [Non-leaf, Leaf] are serialized in the data/ folder.
  • Duplicates for a certain value are stored in overflow pages which are also serialized in the data/ folder.

Insertion

  • Any tuple is inserted in its correct place according to the ordering of the clustering key.
  • Lazy shifting is utilized, where any empty space in prior pages is used so that tuples can be shifted upwards between several pages if there is no space in the current page.
  • Binary search is used.

Update

  • The WHERE clause contains a condition for the clustering key only.
  • If the clustering key is indexed, its index is used for faster search for the tuples to be updated.
  • If the clustering key is not indexed, binary search is used.

Delete

  • The WHERE clause contains a condition for any column.
  • If any of those columns are indexed, its index is used for faster search for the tuples to be deleted.
  • No shifting is done between pages.
  • If no column is indexed, linear search is used.

SELECT Queries

  • No joins are supported.
  • The filtering of tuples to be selected is optimized.

databaseengine_index_project's People

Contributors

mariamaged avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.