Coder Social home page Coder Social logo

cmu-15445's Introduction

CMU-15445

Schedule site https://15445.courses.cs.cmu.edu/fall2018/schedule.html

Study blog for cmu 15 445 https://www.jianshu.com/nb/36265841

cmu_15445_2017.rar is the project origin source file.

cmu_15445_2017_done.rar is the project solution(including 4 projects). make sure pass all the tests including (tuple.test,vtable.test...)

Target

1. Correctness

My Solution make sure cover as most test cases as possible.

  • project 1 14 tests

  • project 2 ~30 tests

  • project 3 20 tests

  • project 4 9 tests And pass at least 1000 times for project 2&3&4

  • make check

16/16 Test #16: virtual_table_test ............... Passed 0.72 sec

100% tests passed, 0 tests failed out of 16

Total Test time (real) = 38.21 sec

[100%] Built target check

2. Simple and Understandable

  • Concise code is always my aim.

Blog [chinese]

  • Lab 3: Concurrency Control Lack info when using 2018 project documentation, so change to 2017
  • Lab 4: Logging & Recovery Lack info during using 2018 project documentation, so change to 2017

For self-study, take care using it if u are a student

Every student has to work individually on this assignment. Students are allowed to discuss high-level details about the project with others. Students are not allowed to copy the contents of a white-board after a group meeting with other students. Students are not allowed to copy the solutions from another colleague.

Origin Readme

Build

mkdir build
cd build
cmake ..
make

Debug mode:

cmake -DCMAKE_BUILD_TYPE=Debug ..
make

Testing

cd build
//make sure u setup libvtable.so
vim /etc/ld.so.conf
//add one line for /where/you/install/lib
sudo ldconfig
make check

Run virtual table extension in SQLite

Start SQLite with:

cd build
./bin/sqlite3

In SQLite, load virtual table extension with:

.load ./lib/libvtable.dylib

or load libvtable.so (Linux), libvtable.dll (Windows)

Create virtual table:
1.The first input parameter defines the virtual table schema. Please follow the format of (column_name [space] column_type) seperated by comma. We only support basic data types including INTEGER, BIGINT, SMALLINT, BOOLEAN, DECIMAL and VARCHAR.
2.The second parameter define the index schema. Please follow the format of (index_name [space] indexed_column_names) seperated by comma.

sqlite> CREATE VIRTUAL TABLE foo USING vtable('a int, b varchar(13)','foo_pk a')

After creating virtual table:
Type in any sql statements as you want.

sqlite> INSERT INTO foo values(1,'hello');
sqlite> SELECT * FROM foo ORDER BY a;
a           b         
----------  ----------
1           hello   

See Run-Time Loadable Extensions and CREATE VIRTUAL TABLE for further information.

Virtual table API

https://sqlite.org/vtab.html

TODO

  • update: when size exceed that page, table heap returns false and delete/insert tuple (rid will change and need to delete/insert from index)
  • delete empty page from table heap when delete tuple
  • implement delete table, with empty page bitmap in disk manager (how to persistent?)
  • index: unique/dup key, variable key

cmu-15445's People

Contributors

yixuaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cmu-15445's Issues

关于extendible_hash_test的问题

测试中要求GetLocalDepth(x)的值必须是给出的那样,但我认为根据对key做hash的算法的不同,local depth可以有不同的值,只要满足任意一个bucket的local depth小于等于global depth,并且每个元素都可以Find成功即可,所以我觉得他给的这个测试有问题。

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.