TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: I am developing a website. Postgres or Mongodb?(see description for idea)

1 pointsby pvsukale1about 9 years ago
I have an idea of a website.It will be like an online startup social network where people can discuss, submit links,review these startups. New startups will also get to features themselves and present to people. we will have many metrics for these startups like buzz , potential etc. users will also have reputations based on upvotes/downvotes they receive on their comments/reviews/links.I have decided to use Golang for this application.I am asking for advice on which database to use MongoDB or Postgres or something else as I am very confused from various articles on the internet ,also it will be helpful if got any advice for the Go part of application.Thank you!suggestions are welcome!

4 comments

ape-boxabout 9 years ago
I don&#x27;t know about the Go part, but on the db side i have no doubt: go with PostgreSQL.<p>I advise you in ANY case to read about both ... more ... and more in depth.<p>Mongo is nice but i can&#x27;t see an use for it as a proper DB, it is useful from other perspectives (similar argument to why chose nodejs or not), but given the position i assume you are in, as single man army, you need to know what you are doing, and skipping the data part is a big mistake, you have to know what is your data and how to structure it, you can&#x27;t let your models define it ... or you could, and grant yourself maintenance work forever ...<p>PostgreSQL on the other hand is one of the best, if not the best database, and if you are worrying about performance, you are worrying about the wrong things, and from the wrong angle, and still Postgre have amazing performance if you know what you are doing.<p>I would consider using mongo for only two reasons: just for fun, or because i need to ship in zero time, and in the latter i would think twice and go with Postgre anyway ...<p>PS. I might have been a bit trolly on the mongo side, but seriously give Postgres a shot, every minute you spend on it is worth more than the specific knowledge you gain!
评论 #11676839 未加载
PaulHouleabout 9 years ago
Not MongoDB; it is something people want to believe in but it overpromises and underdelivers. If you like the idea of MongoDB, try CouchBase.<p>Otherwise Postgres is battle-tested but still moving forward, it is not a bad choice.
评论 #11674610 未加载
brudgersabout 9 years ago
For a social network, modeling the data as a graph rather than a table or document might be a favorable architectural decision.<p>Good luck.
评论 #11676810 未加载
kokonotuabout 9 years ago
May I ask what make you decide to use Golang? instead of Rails or Nodejs?
评论 #11681789 未加载