Live data from Hacker News

Show HN: A Database Written in Golang

github.com

31–40 of 80 posts

Re: Show HN: A Database Written in Golang

#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

Re: Show HN: A Database Written in Golang

#32

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.

[deleted]

Re: Show HN: A Database Written in Golang

#33
post #17

Earlier quoted context omitted.

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

You're a "dev," but don't seek out test folders/files for use case examples? Don't let your employer know...

[flagged]

Re: Show HN: A Database Written in Golang

#34
post #24

Someone asked about resources and I ran into this while evaluating embedded db options for a golang project - it's a collection of db components implemented in golang: https://github.com/thomasjungblut/go-sstables

thank you for referring, feel free to ask any questions you may have

Re: Show HN: A Database Written in Golang

#35

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…

Hi Phil, I thought I'd find you here! Love your blog!

Re: Show HN: A Database Written in Golang

#36
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

yes man have to work on adding the sql cmd support thanks for the links

Re: Show HN: A Database Written in Golang

#37
post #7

This looks like a good exploratory project! One thing I’d add to the readme is an example of how you’d use the database in an example application. From the docs, it’s clear that this isn’t a sql database (yet?), so it would be good to have an example to see how to use the database. It might also be nice to have a description of what happens when you insert or get a record, so others can learn from the code too. Or ca…

thanks man yes currently it is not a fully sql database (have to add query support) My fav part of code is the data retrieval code because had some issues there & got to know lot about it

Learnt about B+ Trees, transactions, managing concurrent reads & data presistence

Post reply on HN