JasonLaw

JasonLaw

BV2EX 第 484411 号会员,加入于 2020-04-17 11:42:03 +08:00
IntelliJ IDEA 格式化代码问题
程序员  •  JasonLaw  •  1 年前  •  最后回复来自 JasonLaw
4
GitLab - 怎么禁止特定仓库的动态出现在 Activity?
程序员  •  JasonLaw  •  1 年前  •  最后回复来自
为什么最近猎德地铁口这么多共享单车?
广州  •  JasonLaw  •  1 年前  •  最后回复来自
GitLab CI/CD - publish 镜像到私有镜像仓库出错
程序员  •  JasonLaw  •  1 年前  •  最后回复来自 simonlu9
5
阿里云 ECS 无法 git clone GitHub repo
程序员  •  JasonLaw  •  1 年前  •  最后回复来自 YFun
13
怎么预测明天的营业额?
问与答  •  JasonLaw  •  1 年前  •  最后回复来自 whywaoxaks
14
怎么安全地在 web 前端存储私钥?
程序员  •  JasonLaw  •  1 年前  •  最后回复来自 Nyarime
46
Debezium Outbox Pattern,怎么自定义 topic 的名称?
程序员  •  JasonLaw  •  1 年前  •  最后回复来自
JasonLaw 最近回复了
@mkdir #127 是的,有几个是几年前的。
@mreasonyang #103 “DBA 与业务强耦合”和“在持久层耦合业务逻辑”是什么意思?
@mreasonyang #103 物理外键是人设置的,但外键约束不是由人保证,这样也叫“没有实质区别”?
我感觉讨论下去没有太大意义了,没有一个事情是绝对的,每个东西都有它适用的场景。
@chengyiqun #111 SQL ? NoSQL ?还是 NewSQL ?
@fkdog #99 “NULL 造成无效索引”?

https://www.v2ex.com/t/694500
@sy20030260 #96 我只是说国外大多数人会选择使用外键。

你应该是从这个 Reddit 找到那个 issue 的。

https://www.reddit.com/r/programming/comments/dtls30/at_github_we_do_not_use_foreign_keys_ever_anywhere/
@fkdog #95 希望大家都就事论事,不要说有的没的。外键最重要的作用是保证 referential integrity 。关于“ 删除一个 user,直接清空了与该 user 有关联的所有表的所有数据”,这个是显式声明了 ON DELETE CASCADE 。
@skiy #84 让我想起了以下这几段话。(来源: https://stackoverflow.com/a/85298/5232255

This is an issue of upbringing. If somewhere in your educational or professional career you spent time feeding and caring for databases (or worked closely with talented folks who did), then the fundamental tenets of entities and relationships are well-ingrained in your thought process. Among those rudiments is how/when/why to specify keys in your database (primary, foreign and perhaps alternate). It's second nature.

If, however, you've not had such a thorough or positive experience in your past with RDBMS-related endeavors, then you've likely not been exposed to such information. Or perhaps your past includes immersion in an environment that was vociferously anti-database (e.g., "those DBAs are idiots - we few, we chosen few java/c# code slingers will save the day"), in which case you might be vehemently opposed to the arcane babblings of some dweeb telling you that FKs (and the constraints they can imply) really are important if you'd just listen.

Most everyone was taught when they were kids that brushing your teeth was important. Can you get by without it? Sure, but somewhere down the line you'll have less teeth available than you could have if you had brushed after every meal. If moms and dads were responsible enough to cover database design as well as oral hygiene, we wouldn't be having this conversation. :-)
@illuz #78 所以我在#67 贴出了 reddit 上的一些讨论
关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   实用小工具   ·   2001 人在线   最高记录 5497   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 00:42 · PVG 08:42 · LAX 17:42 · JFK 20:42
♥ Do have faith in what you're doing.