在数据库中使用大量关系是什么问题? [英] What is the problem of using a lot of relations in database ?

查看:86
本文介绍了在数据库中使用大量关系是什么问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我已经开始设计数据库,每当我重新考虑它时,我发现我可以使用新表代替字段,并增强编程能力.

但是最后我发现有很多表具有很多关系,所以这意味着对数据库的查询很多,但另一方面,它可以使我的软件成为我想要的东西. >
你有什么想法?在数据库中使用很多关系是错误的吗?

谢谢您的回答.

Hi everybody,
I have started to design a database and every time i rethink about it, i am finding that i can use a new table instead of a field, and enhance the program ability.

but at the end i find out that there are a lot of tables with a lot of relations,so it means a lot of queries to the database, but on the other hand it can make my software what i am looking for.

what is your idea? is it wrong to use a lot of relations in a database?

thank you for you answers.

推荐答案

请参阅我对问题的评论.您的问题可能基于您的误解或您未解释的概念.

关系不应该真正通过它们的总数或类似的数量来量化.而且很多关系"并不一定意味着很多查询",只要您做对.关系的结构应由您要用数据库表示的实际知识的结构定义.也许您需要通过学习诸如数据库规范化:
的方法开始着手解决所有问题. http://en.wikipedia.org/wiki/Database_normalization [ http://en.wikipedia.org/wiki/Don%27t_repeat_yourself [ http://en.wikipedia.org/wiki/Database_tuning [ http://en.wikipedia.org/wiki/Query_optimization [
Please see my comment to the question. Your question might be based on some your misconception or maybe the conception you do not explain.

The relationships should not really be quantified by the total number of them or something like that. And "a lot of relations" does not have to mean "a lot of queries", it you do it right. The structure of relations should be defined by the structure of actual knowledge you want to represent with a database. Perhaps you need to start approaching it all by learning about such thing as database normalization:
http://en.wikipedia.org/wiki/Database_normalization[^].

You should also understand, that one of the most important principles here is the "Don''t Repeat Yourself" principle:
http://en.wikipedia.org/wiki/Don%27t_repeat_yourself[^].

And then you will be able to look for the optimization:
http://en.wikipedia.org/wiki/Database_tuning[^],
http://en.wikipedia.org/wiki/Query_optimization[^].

Good luck,
—SA


这篇关于在数据库中使用大量关系是什么问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆