您如何管理“选择列表”?在数据库中 [英] How do you manage "pick lists" in a database
本文介绍了您如何管理“选择列表”?在数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有多个选择列表实体的应用程序(用于填充单选下拉列表选择框)。这些实体需要从数据库中提取。如何将这些实体保留在数据库中?我应该为每个选择列表创建一个新表吗?有更好的解决方案吗?
I have an application with a number of "pick list" entities (used to populate single choice dropdown selection boxes). These entities need to be pulled from the database. How do I persist these entities in the database? Should I create a new table for each pick list? Is there a better solution?
推荐答案
那么,您可以执行以下操作:
Well, you could do something like this:
PickListContent
IdList IdPick Text
1 1 Apples
1 2 Oranges
1 3 Pears
2 1 Dogs
2 2 Cats
,还可以选择..
PickList
Id Description
1 Fruit
2 Pets
这篇关于您如何管理“选择列表”?在数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文