问题描述
我大约有50个表对象.
我在某些表格中有共同的数据,例如(产品名称,说明,评论....)
例如:杂货,大理石,使用者....
所有表的名称,说明和某些列是通用的.
将来会有更多新表被添加到列中,如果我们需要添加表或列,我需要联系我的数据库.
我想出了
一个具有表列表的表(表的主表)和列主表,其中哪个表中的列是
例如:表格主:杂货,用户..
列主:名称,描述,注释
table_column_Master:用于表主控器和列主控器的关系表:表主控器的PK和列主控器的PK,以及一个运行ID作为此表的PK.
我有一个数据表来存储所有字符串值并维护与table_column_Master的关系.
但我认为执行任何操作的查询都很昂贵.例如:要获取对数据表的userdetails查询的次数很高(为userdetails选择查询num =列数)
我没有任何其他设计.请有人帮我.
问候,
Sekhar
Hi,
I have around 50 table objects.
i have common data in some of the tables like(product name, description,comment....)
ex: groceries, marbles, users, ....
all tables Name, remarks and some of the columns are common.
Future some more new tables are columns may come into addition, if we need to add table or column i need to touch my DB.
i come up with
one table with list of tables (master of tables) and column master table for in which table what are the columns
ex: table master : groceries,users..
column master: name,description,comment
table_column_Master: relation table for tablemaster and column master : PK of table master and PK of column master and one running id as PK for this table.
i have a data table to store all string values and maintaining relation with table_column_Master.
but i am thinking queries to perform any action is expensive. ex: to get userdetails queries to datatable is high (select query num = no.of columns for userdetails )
i am not getting any other design. please some one help me.
Regards,
Sekhar
推荐答案
这篇关于设计数据库的更好方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!