普通英语 [英] Normalization in plain English

查看:131
本文介绍了普通英语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我理解数据库规范化的概念,但总是很难用简单的英语解释它 - 特别是面试。我已阅读维基百科的帖子,但仍然很难向非开发人员解释这个概念。 以一种不会得到重复数据的方式设计数据库是第一件想到的事情。

I understand the concept of database normalization, but always have a hard time explaining it in plain English - especially for a job interview. I have read the wikipedia post, but still find it hard to explain the concept to non-developers. "Design a database in a way not to get duplicated data" is the first thing that comes to mind.

有没有人有一个很好的方式来解释数据库规范化的概念用简单的英语?什么是一些很好的例子,以显示第一,第二和第三正常形式之间的差异?

Does anyone has a nice way to explain the concept of database normalization in plain English? And what are some nice examples to show the differences between first, second and third normal forms?

说你去面试的人,该人问:

Say you go to a job interview and the person asks: Explain the concept of normalization and how would go about designing a normalized database.

访问者寻找的关键点是什么?

What key points are the interviewers looking for?

推荐答案

好吧,如果我必须向我妻子解释一下:

Well, if I had to explain it to my wife it would have been something like that:

主要思想是避免大数据的重复。

The main idea is to avoid duplication of large data.

让我们来看看一个人的名单和他们来自的国家。我们不必为每个人持有可以与波斯尼亚 - 黑塞哥维那一样长的国家的名称,而是持有一个提及国家表格的数字。因此,我们持有100波斯尼亚和黑塞哥维那,我们持有100#45。现在在未来,如同巴尔干国家经常发生的那样,它们分裂成两个国家:波斯尼亚和黑塞哥维那,我只能在一个地方改变它。好吧,排序。

Let's take a look at a list of people and the country they came from. Instead of holding the name of the country which can be as long as "Bosnia & Herzegovina" for every person, we simply hold a number that references a table of countries. So instead of holding 100 "Bosnia & Herzegovina"s, we hold 100 #45. Now in the future, as often happens with Balkan countries, they split to two countries: Bosnia and Herzegovina, I will have to change it only in one place. well, sort of.

现在,为了解释2NF,我会改变这个例子,让我们假设我们拥有每个人访问的国家列表。
而不是持有一个表格:

Now, to explain 2NF, I would have changed the example, and let's assume that we hold the list of countries every person visited. Instead of holding a table like:

Person   CountryVisited   AnotherInformation   D.O.B.
Faruz    USA              Blah Blah            1/1/2000
Faruz    Canada           Blah Blah            1/1/2000

我将创建三个表,一个表与国家列表,一个表与人列表,另一个表连接他们。这给了我最大的自由,我可以得到改变人的信息或国家信息。这使我能够按照规范化的要求删除重复的行。

I would have created three tables, one table with the list of countries, one table with the list of persons and another table to connect them both. That gives me the most freedom I can get changing person's information or country information. This enables me to "remove duplicate rows" as normalization expects.

这篇关于普通英语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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