You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learning-oriented Compact Relational Database Management System Implementation in Golang
Origin of SamehadaDB is Golang ported BusTub RDBMS: go-bustub
What is Samehada?
Samehada, which literally means shark skin, is a tool used to grate wasabi, usually for sushi, but also for other Japanese cuisines
Samehada features its grid shape that forms air bubbles between the grated wasabi, minimizing unnecessary spiciness
We are proud to call SamehadaDB because the grid produces a pleasant taste and aroma with a nice harmony
(Texts in this section is contributed by ujihisa. Thanks ujihisa)
Motivation
RDBMS implementation which is compact but has almost of essential componets and features implemted in practical techniques is needed for newbie of database system developer
SamehadaDB is developed to be a RDBMS like above
Golang has high readability
SamehadaDB is based on BusTub RDBMS which is used in educational purpose
ryogrid.net:19999 is public SamehadaDBd server for the demonstration
Do not insert private or secret information/data! the server does not do isolation
ATTENTION: SamehadaDB is not developed for productional use! There are no warranties!
By the way, procedure described on next section executes almost all defined unit tests except these of taking long time
Procedure of Executing SamehadaDB (executing unit tests)
Please install golang environment with package system your OS has (apt, yum, brew ...etc)
If you use Windows, you can select both Windows native environment and WSL Ubuntu environment
If you select Windows native environments or golang environment which is installed with package system can't execute SamehadaDB, you should install official binary directly
Concurrecy control protcol is SS2PL-NW (Strong Strict 2-Phase Locking - No Wait) and locking granularity is tuple level (record level)
a.k.a 2PL-NW, No-Wait 2PL
Avoidance of phantom problem is not implemented yet
So, current transaction isolation level is "REPEATABLE READ"
And when table has Indexes, dirty read can be occured
So, when you use Indexes, isolation level is "DIRTY READ"
Why dirty read occurs is lack of consistency between table record and index entry at DELETE
Execution Planning from hard coded SQL like method call I/F (like some kind of embedded DB)
Execution of Query with SQL string
not supported multi queries on a request yet
Frontend Impl as Embedded DB Library (like SQLite)
Deduplication of Result Records (Distinct)
Query Optimization (Selinger)
cases below are not supported now
predicate including OR operation, NOT, IS NULL
projection including aggregation
LIMIT, ORDER BY
Statistics Data for Optimizer
Statistics data are updated continuously with full scan...
TRANSACTION Statement on SQL
This includes adding support of multi statements (multi statements is not suported on SQL now)
AS clause
Nested Query
Predicates: IN
DB Connector (Driver) or Other Kind of Network Access Interface
MySQL or PostgreSQL Compatible Protocol
REST
Deallocate and Reuse Page
Optimization of INSERT
Current implementation searches a free space which is enough for insert data with sequential scan from head (this is slow on exsisting large amount of records situation)
UNION clause
Materialization
Classes which offers functionality for materialization exists
Now, HashJoinExecutor only do materialization with the classes
Authentication
Making Usable from OR Mapper of One Web Framework Such as Django (Python) on Simple Application Scope
implementation of DB driver/connector for Python is needed (Or supporting major RDBMS compatible NW I/F)
2022 May - 2025 April: SamehadaDB project is assisted by OSS community support program of JetBrains s.r.o with offering development tools such as GoLand IDE