Live data from Hacker News

Show HN: Mathesar – open-source collaborative UI for Postgres databases

github.com

11–20 of 80 posts

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#11
post #9

Nice work! It looks like Sequel Pro for Postgres. This might be the first free, user-friendly interface for Postgres out there. Closest would be TablePlus but it’s paid.

tableplus is freemium like. in the free version can have 2 tabs open. it also works with way more than postgres.

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#12
post #6

So happy to realize your stack includes Python, Postgres, Typescript and Svelte because I once flirted with such idea for a personal project. I'm inspired.

If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0] [0] - I understand that types can be added on top, but I never found the integration to work that well with mypy when I last tried it many years ago.

Yeah, interesting question! Our [team][0] is eight people who would probably give eight different answers. We've had some [debate][1] about whether or not to use types in Python, and eventually we settled on not using them. However we do use TypeScript. That makes our team a bit stratified across these different typing paradigms. This stratification seems to work okay though because each engineer's role is focused on either front-end work in TypeScript or back-end work in Python (without types). The front end people tend to like types, and the back end people tend not to.

Personally, I love types! (Can you tell that I'm on the front end team??) I used mypy extensively at my last job and liked it okay, but mypy is just not as nice as TypeScript. It's come a long way, but it can still be pretty cumbersome. TypeScript on the other hand is fantastic. I'm certainly never going back to JavaScript. But to get back to your original question: yes, for me using TypeScript has changed my tendency to use Python for other tasks. I just don't want to use Python as much. For backend work, I'd reach either for TypeScript, or for Rust. But keep in mind I'm just a front end dev! :)

[0]: https://mathesar.org/about.html [1]: https://github.com/centerofci/mathesar/discussions/913

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#13
post #6

So happy to realize your stack includes Python, Postgres, Typescript and Svelte because I once flirted with such idea for a personal project. I'm inspired.

If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0] [0] - I understand that types can be added on top, but I never found the integration to work that well with mypy when I last tried it many years ago.

I haven't because I'm Python biased. ;) However, for Web I've found myself leaning to TypeScript for type-safety and DX reasons.

Have you ever tried [Pydantic](https://docs.pydantic.dev)!? It may be what you need for type safety / data validation.

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#14

Earlier quoted context omitted.

(Mathesar core team member here.) Thanks for the kind words! Our demo server actually spins up a unique database for each session, giving you the capability to make changes to the database and try Mathesar's features to the fullest extent. Your changes are only visible to you unless you send the link to someone else.

Could you elaborate that a bit? That sounds interesting too.

Yes! We have set up a Postgres template database[1] with our demo data sets. When a user logs in, we create a new database based on the template database and associate the database with the session key set up for that login. So every session is associated with a different database and we have some Django middleware that routes you to the URL associated with your session's database. If you log out and log back in (thus ending your session), you'll be routed to a brand new database.

However, all databases are accessible to the demo user, so if you send a link to someone else, they will see your database (since the URL includes the database identifier).

You can see our code for it here: https://github.com/centerofci/mathesar/tree/develop/demo

[1] https://www.postgresql.org/docs/current/manage-ag-templatedb...

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#15
post #6

So happy to realize your stack includes Python, Postgres, Typescript and Svelte because I once flirted with such idea for a personal project. I'm inspired.

If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0] [0] - I understand that types can be added on top, but I never found the integration to work that well with mypy when I last tried it many years ago.

I started using type annotations heavily in my Python code recently, and coupled with IDEs like VSCode and PyCharm that leverage the typing, and the underlying tools like pyright/pylance, it's a game changer.

I wouldn't try and write a decent-sized Python project without typing now.

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#16
post #6

Earlier quoted context omitted.

If I may ask, have you found using a Typed language such as Typescript has changed your tendency to use Python for other tasks, given that it isn't typed? [0] [0] - I understand that types can be added on top, but I never found the integration to work that well with mypy when I last tried it many years ago.

I haven't because I'm Python biased. ;) However, for Web I've found myself leaning to TypeScript for type-safety and DX reasons. Have you ever tried [Pydantic]( https://docs.pydantic.dev )!? It may be what you need for type safety / data validation.

JSONLD types are specified with @type, and the range of a @type attribute includes rdfs:Class.

icontract and pycontracts (Design-by-Contract programming) have runtime type and constraint checking; data validation. Preconditions, Command, Postconditions (assertions, assertions of invariance after command C_funcname executed) https://github.com/Parquery/icontract

pydantic_schemaorg: https://github.com/lexiq-legal/pydantic_schemaorg

> Pydantic_schemaorg contains all the models defined by schema.org. The pydantic classes are auto-generated from the schema.org model definitions that can be found on https://schema.org/version/latest/schemaorg-current-https.js... [ https://github.com/schemaorg/schemaorg/tree/main/data/releas... ]

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#17
post #4

This is super cool! I really dig the way airtable makes relational databases accessible to non-developers, but I've been looking for open source alternatives. Going to give this a spin this weekend :)

Thanks! We have taken a lot of inspiration from Airtable -- but we've deliberately avoided calling ourselves an "Open Source Airtable alternative" because we are actually trying to stay more true to the concept of "relational data" than Airtable does. Airtable sweeps a lot under the rug. Primary keys and foreign keys are heavily abstracted in Airtable, giving rise to some surprising behavior for anyone more accustomed to actual databases.

In Mathesar, we want the abstractions to be as thin as possible, while still giving non-technical users the capability to model and edit their data. You can point Mathesar and an existing Postgres database and, as long as all the foreign keys are in place, you should be able to use it a lot like Airtable. But when you set up a new relationship between tables, you'll find that it works very differently in Mathesar than in basically any other spreadsheet-database hybrid tool.

One-to-many relationships use a foreign key column in one table (instead of in two tables in Airtable). Many-to-many relationships use two FK columns in a join table (instead of by showing a column in each of the two related tables). All of the data is kept normalized. That normalization can make it hard to work with the data though! So we are developing a robust graphical query builder (called the "Data Explorer") which lets you to see data joined across multiple tables.

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#18
post #9

Nice work! It looks like Sequel Pro for Postgres. This might be the first free, user-friendly interface for Postgres out there. Closest would be TablePlus but it’s paid.

Thank you! I was pretty surprised that nothing like Mathesar existed already.

Unlike SequelPro and TablePlus, we're a web application (although we do want to do a desktop version eventually). And Mathesar works even if you don't have an existing DB to connect to – you can set up a DB from scratch during installation.

Re: Show HN: Mathesar – open-source collaborative UI for Postgres databases

#19
post #14

Earlier quoted context omitted.

Could you elaborate that a bit? That sounds interesting too.

Yes! We have set up a Postgres template database[1] with our demo data sets. When a user logs in, we create a new database based on the template database and associate the database with the session key set up for that login. So every session is associated with a different database and we have some Django middleware that routes you to the URL associated with your session's database. If you log out and log back in (thu…

Thanks!
Post reply on HN