Live data from Hacker News

Show HN: Stellar – Git for PostreSQL and MySQL

github.com

51–60 of 79 posts

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#51

Generally the hardest thing with version control on a database (for an evolving codebase) is separating unrelated changes - such as schema changes vs content updates - and branching and merging those changes in sync with the code dependencies. Another issue is non-destructively replaying development changes into test/production environments. So for example, you might have a feature branch that includes some schema ch…

This sounds like something Sqitch would help with. http://sqitch.org

FWIW, I found shmig [1] much simpler than sqitch.

Last I used sqitch, it returned a zero value on error, which made me leery of using it for scripted deployments.

[1] https://github.com/naquad/shmig

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#52

The implications for this extend beyond backing up your database. Imagine a world where daily time-series data can be stored efficiently: This is a lesser known use case, but it works like this: I'm a financial company and I want to store 1000 metrics about a potential customer. Maybe the number of transactions in the past year, the number of defaults, the number of credit cards, etc. Normally I would have to duplica…

Kx systems kdb+ does this incredibly quickly and easily. I'm sure OneTick, Vhayu and others do too, though I son't have experience with them.

If you insist on standard SQL databases for time series, you'll have a lot more pain

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#53

Generally the hardest thing with version control on a database (for an evolving codebase) is separating unrelated changes - such as schema changes vs content updates - and branching and merging those changes in sync with the code dependencies. Another issue is non-destructively replaying development changes into test/production environments. So for example, you might have a feature branch that includes some schema ch…

I would disagree that referential integrity and schemas are the only issues a DB version control should focus on. For example, I would be very interested in having git like branching on top of something like this - http://sandbox.substance.io/docs/lorem_ipsum.json . Basically version controlled schemaless object tree. I recently implemented something like this, backed by mongodb, and by exposing a HTTP api which mimi…

You can implement a change DAG for a DB inside the DB. It works pretty well.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#54
post #27

If anyone's interested in git-like storage systems then it's work checking out Irmin [1]. Previous discussion is at [2]. Excerpt: "Irmin is a library to persist and synchronize distributed data structures both on-disk and in-memory. It enables a style of programming very similar to the Git workflow, where distributed nodes fork, fetch, merge and push data between each other. The general idea is that you want every ac…

This could work to syncronize data from multiple clients for a invoice, for example?

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#55
post #36
post #27

If anyone's interested in git-like storage systems then it's work checking out Irmin [1]. Previous discussion is at [2]. Excerpt: "Irmin is a library to persist and synchronize distributed data structures both on-disk and in-memory. It enables a style of programming very similar to the Git workflow, where distributed nodes fork, fetch, merge and push data between each other. The general idea is that you want every ac…

I've spent a day looking at Irmin, trying to figure out the JSON CRUD interface, but there's just no documentation, and the irc channel is pretty much dead. The code looks good, but it's my first introduction to OCaml, coming from Clojure. Would love to see some more documentation on it.

Irmin's still being developed, hence not many docs at the moment. Apologies there was no-one responding in irc (I assume you mean #mirage - there are usually 30+ folks there). The mailing list is quite active and is a good place to pose questions.

http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageo...

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#56
post #6

I wish projects like these would always include some basic info in their README about: (1) how it works, and (2) how it might fail.

From what little I've gathered, the internal implementation is basically a system which tracks hash-tagged copies of database tables.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#57

Generally the hardest thing with version control on a database (for an evolving codebase) is separating unrelated changes - such as schema changes vs content updates - and branching and merging those changes in sync with the code dependencies. Another issue is non-destructively replaying development changes into test/production environments. So for example, you might have a feature branch that includes some schema ch…

"Another issue is non-destructively replaying development changes into test/production environments."

"...you need to maintain referential integrity when replaying those updates/inserts"

I think most of your misgivings about this tool are grounded in the expectation that it would provide merge features like Git. Since it claims to be "git for databases", I suppose that's a fair expectation.

However, the tool does provide the core functionality of Git, which is to implement a tracking system for hash-tagged objects (or, in this case, tables). This does have value. Not only is it faster than standard db dumps, it's also more space-efficient. For some people, this could be really valuable.

I think it's an interesting tool and could serve as a launching point for more powerful/useful functionality.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#60
Line 53 of https://github.com/fastmonkeys/stellar/blob/master/stellar/o... is

                CREATE TABLE %s.%s LIKE %s.%s
This made me think of a table called

                create table `a; drop table users;`  (col int);
... which works in mysql.

I don't know if the stellar code will trip over something like this. But mysql (SQL) shouldn't even allow names like that.

Post reply on HN