Skip to content

Commit 6abd650

Browse files
committed
add post 数据库设计时的一个坑
1 parent d024b47 commit 6abd650

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
layout: post
3+
title: "数据库设计的一个坑"
4+
date: 2020-03-12
5+
categories: [blog]
6+
---
7+
8+
describe the 坑:
9+
设计用户表,使用了bigint自增策略作为主键,并将该字段作为userId。
10+
11+
单纯一个系统使用,没啥问题,现在我们要上好几个系统,包括CRM、HRMS、WMS等,要把几个系统的用户汇聚起来,作为一个统一的用户中心,并提供单点登录服务,如果说这几个子系统的userId都是这样设计,那样融合起来就会很费劲了,userId冲突。
12+
<b>所以,不建议userId使用纯数字来表示</b>
13+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy