Live data from Hacker News

Show HN: A Database Written in Golang

github.com

41–50 of 80 posts

Re: Show HN: A Database Written in Golang

#41
post #22

How do you connect to it and actually use it? Does it behave like a SQL database? Row-based? Column-based? Good for analytical workloads? Document store? Redis/memcached database? What are it's strengths or weaknesses? Cool accomplishment in and of itself but hard for anyone here to really give you any criticism or feedback without understanding where it excels and how to work with it.

It does not seem to speak SQL: $ git clone git@github.com:Sahilb315/AtomixDB.git Cloning into 'AtomixDB'... $ cd AtomixDB/ $ go run . Welcome to AtomixDB Available Commands: CREATE - Create a new table INSERT - Add a record to a table DELETE - Delete a record from a table GET - Retrieve a record from a table UPDATE - Update a record in a table BEGIN - Begin new transaction COMMIT - Commit transaction ABORT - Rollback…

yes man it is currently a sql db, have to work on adding query language thanks for checking it out

Re: Show HN: A Database Written in Golang

#42

How do you connect to it and actually use it? Does it behave like a SQL database? Row-based? Column-based? Good for analytical workloads? Document store? Redis/memcached database? What are it's strengths or weaknesses? Cool accomplishment in and of itself but hard for anyone here to really give you any criticism or feedback without understanding where it excels and how to work with it.

it is kind of a sql db but currently does not have the query lang (sql lang) & data is stored in tables similar to other relational DBs. Still have a lot of stuff to add & fix Will add more detail to it

Re: Show HN: A Database Written in Golang

#44
Congratulations on a great exploratory project!

It takes me back to my school years. I never got as far as you (not by any long stretch actually), but I did enjoy creating the storage layer of a database from scratch. To actually have to deal with, instead of just think of, all the edge cases, is quite the transformative experience.

As a humble suggestion, since it seems your goal is to understand how relational databases work and not necessarily to write a new database that will compete with others, maybe don't make it an SQL one? We've got enough of those, and not enough of the others. Would be nice to have a new relational DB using Tutorial D as its language for example.

Keep hacking!

Re: Show HN: A Database Written in Golang

#45

If folks would like to see more examples of databases built to teach oneself, they get shared on the /r/databasedevelopment subreddit not infrequently. Some recent ones: https://www.reddit.com/r/databasedevelopment/comments/1hyig8... https://www.reddit.com/r/databasedevelopment/comments/1ha5cc... https://www.reddit.com/r/databasedevelopment/comments/1dqgms... https://www.reddit.com/r/databasedevelopment/comments/1ix5…

Here's my list (probably not all of them)

https://github.com/FireScroll/FireScroll/

https://github.com/danthegoodman1/DurableStreams (brand new)

https://github.com/danthegoodman1/ObjectKV

https://github.com/danthegoodman1/WriteAhead

https://github.com/danthegoodman1/icedb (most popular)

https://github.com/danthegoodman1/Percolators (kind of a DB on top of a DB, technically just transactions tho)

there are others that might not fit exactly what you're looking for

Re: Show HN: A Database Written in Golang

#46
post #17

Earlier quoted context omitted.

[flagged]

yeah as a dev/non-go person don't know how it works either. I assume main.go is where it starts but then what... I see a commands maybe it works by CLI? idk either

If you're not a developer then you're not the target audience for this.

Re: Show HN: A Database Written in Golang

#48
post #31

If you are wanting proper SQL command support, you could copy the SQLite parser approach. Properly parsing all valid command texts is not a problem that I would find compelling unless I was being compensated for it. https://www.sqlite.org/lemon.html You could probably use something like participle, but you'd have to translate the grammar. https://github.com/alecthomas/participle

You can use https://github.com/cockroachdb/cockroachdb-parser which is basically PGSQL compatible parser implemented in golang

Re: Show HN: A Database Written in Golang

#50
post #44

Congratulations on a great exploratory project! It takes me back to my school years. I never got as far as you (not by any long stretch actually), but I did enjoy creating the storage layer of a database from scratch. To actually have to deal with, instead of just think of, all the edge cases, is quite the transformative experience. As a humble suggestion, since it seems your goal is to understand how relational data…

thanks for the suggestion man, will definitely think about this
Post reply on HN