Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 RDBMS 的表中表示 X 乘 Y 矩阵?想象一下,如果我必须详尽记录一个国家/地区邮政编码之间的所有距离,X 轴将是“From”,Y 轴将是“To”,所有 From == To 的邮政编码为 0 的路口,课程。
带有邮政编码的表格(如果您需要存储任何额外信息,例如城市)和带有 3 列的表格:
postal code 1 id | postal code 2 id | distance between them