Live data from Hacker News

Show HN: Stellar – Git for PostreSQL and MySQL

github.com

41–50 of 79 posts

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

#41

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…

What about Cassandra? I believe it efficiently stores multiple time values for each (row, column) value as it changes. Google's BigTable design does this, and I believe you can use BigTable through Appengine.

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

#42

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…

Have you looked at Datomic? It seems to fit your problem description well.

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

#44
Nice. I wrote a similar tool for Rails / ActiveRecord models: https://github.com/bronson/table_differ

It takes snapshots and computes diffs between snapshots or the live database. It lets me drop and re-import some of my app's tables, then compute the minimum set of changes between the previous import and the new import. I wouldn't call it "git for ActiveRecord models" but it appears to be similar to this project.

Comments welcome! The docs, as always, could use some help.

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

#45

This sort of thing is useful, but already supported by Postgres through transactional DDL. Migrations that fail will have their transaction reverted.

The use case which this really excites me about is automated testing from the GUI level. If the performance is good enough, this would be really useful for restoring DB state in between tests.

ASP.NET developers using TransactionScope can use http://amnesia.codeplex.com/ to manage distributed transactions for automated UI testing.

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

#46

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…

Sounds like a case where Event-sourcing & CQRS might've been handy. (Not reality something you can easily bolt-on afterwards, though.]

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

#47

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

I back up this recommendation whole-heartedly. Sqitch is a fantastic database tool. I stopped using Rails-type migrations because of it (I write PL/pgSQL functions and wanted a migration tool to handle that well, amongst other reasons.)

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

#48
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.

That's the first thing I looked for too. Anyway, I opened an issue: https://github.com/fastmonkeys/stellar/issues/13

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

#49
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.

Seconded. The extent of what I know about this project is:

1. It's like git somehow?

2. I can run some commands which presumably do something?

3. That something happens faster than something postgres can do, which I assume accomplishes the same thing?

4. I assume there's nothing else I need to know?

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

#50

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 mimicked git. I had to relax these two requirements, but it is still worth it.

However I would be very much interested in using libgit2 with a database backend instead of filesystem.

EDIT: not affiliated with substance in any way.

Post reply on HN