Home > Backend Development > PHP Tutorial > 一个字段多个值的数据库设计有关问题

一个字段多个值的数据库设计有关问题

WBOY
Release: 2016-06-13 11:33:25
Original
890 people have browsed it

一个字段多个值的数据库设计问题
现在有字段A。取值是单个的,比如取值是3
有一个字段,取值是多个的。比如字段B,取值可能是1、2、3、4
现在要查出所有含有字段A的值的记录。比如:

记录1:3、5、7(符合)
记录2:6、8、9(不符合)

请问如何设计数据库比较合理?充分考虑到性能优化。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template