TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

1 点作者 pvsukale1大约 9 年前
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 条评论

ape-box大约 9 年前
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 未加载
PaulHoule大约 9 年前
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 未加载
brudgers大约 9 年前
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 未加载
kokonotu大约 9 年前
May I ask what make you decide to use Golang? instead of Rails or Nodejs?
评论 #11681789 未加载