对于数据库而言,三大范式是常说的设计模试,所以这就写一下我对三大范式的理解
第一范式:列不可分
所谓第一范式是指数据库表的每一列都是不可分割的基本数据项,同一列中不能有多个值,即实体中的某个属性不能有多个值或者不能有重复的属性。如果出现重复的属性,就可能需要定义一个新的实体,新的实体由重复的属性构成,新实体与原实体之间为一对多关系。在第一范式(1NF)中表的每一行只包含一个实例的信息。
上面这一段是不是有点不好理解?
举个例子:

如上面这张表,根所第一范式,同一列中不能有多个值,所以每个单元格只能有一个值,所以这个表必需拆分,而且定单和商品是俩个实体,所以要新建一张订单表

如上,我面便符合了第一范式
第二范式:不能部份依赖
第二范式(2NF)是在第一范式(1NF)的基础上建立起来的,即满足第二范式(2NF)必须先满足第一范式(1NF)。第二范式(2NF)要求数据库表中的每个实例或行必须可以被唯一的区分。为实现区分通常需要为表加上一个列,以存储各个实例的惟一标识。要求实体的属性完全依赖于主关键字。
简单说,如果你要添加个商品,如 笔记本 那我要如何添加在商品例表?由于没有个独立商品表,所以,这条范式要示,每个实例是唯一区分的,而依赖表存的是实例的唯一主键,而不是整个实列!
举个例子:

这样,定单,商品,以及俩者的对应就都分开了,这样我们就符合了第二范式。
第三范式:无传递依赖
第三范式需要确保数据表中的每一列数据都和主键直接相关,而不能间接相关。
这条比较简单,说白了,你不能让不同实体的数据直接写在一个表里。所以第一个表还要分成定单和用户!
举个例子 :

致此,我们终于完成了三大范式,这样我们就是个标准的数据表了!
Comments | 108 条评论
I constantly emailed this website post page to all my friends, because if like to read it next my links will too.
Great website you have here but I was curious if you
knew of any message boards that cover the same topics talked about in this article?
I’d really love to be a part of online community where I can get advice
from other knowledgeable people that share the same
interest. If you have any recommendations, please let me know.
Thank you!
Informative article, totally what I needed.
This text is worth everyone’s attention. Where can I find out more?
I know this if off topic but I’m looking into starting
my own weblog and was curious what all is needed to get set up?
I’m assuming having a blog like yours would cost a pretty penny?
I’m not very web savvy so I’m not 100% positive. Any suggestions or advice
would be greatly appreciated. Appreciate it
Can I simply just say what a comfort to find somebody that actually knows what they are discussing on the web.
You definitely know how to bring a problem to light and make it important.
More people must look at this and understand this side of the story.
I was surprised you aren’t more popular given that you most certainly have the gift.
Hey there! I’m at work browsing your blog from my new
iphone 3gs! Just wanted to say I love reading your blog and
look forward to all your posts! Keep up the fantastic
work!
I could not resist commenting. Perfectly written!
May I just say what a relief to uncover an individual who really knows what
they are discussing on the net. You definitely realize how to bring an issue to
light and make it important. A lot more people should check this out and understand this side of the story.
It’s surprising you are not more popular given that
you certainly possess the gift.
Greetings! Very helpful advice in this particular article!
It’s the little changes that make the most significant changes.
Thanks for sharing!
hello!,I like your writing very so much!
share we be in contact more approximately your article on AOL?
I need an expert in this area to resolve my problem.
Maybe that is you! Taking a look ahead to see you.
Hello it’s me, I am also visiting this web page on a
regular basis, this web site is really good and the
people are genuinely sharing nice thoughts.
Hello! Would you mind if I share your blog with my twitter group?
There’s a lot of folks that I think would really enjoy your content.
Please let me know. Thank you
An outstanding share! I have just forwarded this onto a co-worker who was conducting a little research
on this. And he in fact bought me dinner because I discovered it for him…
lol. So allow me to reword this…. Thank YOU for
the meal!! But yeah, thanx for spending some time to discuss this subject here on your web page.
Everything is very open with a very clear clarification of the
issues. It was really informative. Your website is very useful.
Thank you for sharing!
What’s up to all, for the reason that I am actually keen of reading this web site’s post to be updated daily.
It contains pleasant information.
Good info. Lucky me I ran across your website by accident (stumbleupon).
I’ve book marked it for later!
Does your site have a contact page? I’m having trouble
locating it but, I’d like to shoot you an email.
I’ve got some ideas for your blog you might be interested in hearing.
Either way, great website and I look forward to seeing it expand over time.
Hey! I could have sworn I’ve been to this site before but after checking through
some of the post I realized it’s new to me. Nonetheless, I’m definitely delighted
I found it and I’ll be bookmarking and checking back frequently!
Great article! We are linking to this particularly great post on our website.
Keep up the great writing.
Howdy just wanted to give you a quick heads up and let you know a few of the pictures aren’t loading correctly.
I’m not sure why but I think its a linking issue. I’ve tried it in two different
web browsers and both show the same results.
Asking questions are genuinely pleasant thing if
you are not understanding anything totally, but this post presents good understanding yet.
You really make it seem so easy with your presentation but I find this matter to be actually something that
I think I would never understand. It seems too complex and extremely broad for
me. I’m looking forward for your next post, I’ll try to get the hang of it!
Hi there, just wanted to tell you, I loved this blog post.
It was inspiring. Keep on posting!
I am sure this article has touched all the internet people, its
really really fastidious paragraph on building up new webpage.
Hi there, I desire to subscribe for this webpage to get hottest updates, thus where
can i do it please assist.
Woah! I’m really loving the template/theme of this blog. It’s simple,
yet effective. A lot of times it’s hard to get that “perfect balance” between superb usability and appearance.
I must say you have done a amazing job with this.
Also, the blog loads very quick for me on Opera.
Excellent Blog!
At this moment I am ready to do my breakfast, afterward having my breakfast coming again to read more news.
It’s really a great and helpful piece of information. I am glad that you shared this
useful information with us. Please stay us informed like this.
Thanks for sharing.
Thanks for any other magnificent post. The place else
could anyone get that kind of information in such an ideal way of writing?
I’ve a presentation subsequent week, and I am at the search for such
information.
hello there and thank you for your information – I have definitely picked up something new from right here.
I did however expertise some technical issues using this website, as I experienced to reload the website lots
of times previous to I could get it to load correctly.
I had been wondering if your hosting is OK?
Not that I’m complaining, but sluggish loading instances times will very frequently affect your
placement in google and can damage your high-quality score
if advertising and marketing with Adwords. Well I’m adding this
RSS to my email and could look out for much more of your
respective fascinating content. Make sure you update this again very soon.
This design is wicked! You certainly know how to keep a reader amused.
Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job.
I really loved what you had to say, and more than that, how you presented
it. Too cool!
Hey there would you mind stating which blog platform you’re using?
I’m planning to start my own blog in the near future but I’m
having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
The reason I ask is because your layout seems different then most blogs and I’m looking for something completely unique.
P.S My apologies for getting off-topic but I had to
ask!
bookmarked!!, I like your site!
You also can discover up to date details on the highest leagues courtesy
of our football writers.
Great site you have got here.. It’s hard to find
quality writing like yours these days. I truly appreciate
individuals like you! Take care!!
Everything is very open with a very clear description of the
challenges. It was definitely informative. Your website is very useful.
Thanks for sharing!
Stunning quest there. What occurred after? Take care!
At Betiton, you can bet on dozens of sports, all of which are readily available on our on-line sportsbook.
Heya i am for the first time here. I came across this board and I find It really useful & it
helped me out much. I hope to give something back and help others like you
helped me.
Just place, a sportsbook is a spot where men and women can wager on sports.
Excellent goods from you, man. I have understand your stuff previous to and you’re just extremely fantastic.
I really like what you have acquired here, certainly like what you’re stating and the way in which you say it.
You make it enjoyable and you still take care of to keep
it smart. I cant wait to read far more from you.
This is actually a great web site.
Hi there, its pleasant post concerning media print, we all be
familiar with media is a enormous source of
facts.
Betting by way of bookmakers is illegal in the United States except in the state of Nevada.
But the biggest mover in the marketplace is newcomer Ed Sheeran with his newly released
winter enjoy song ‘Afterglow’.
When I originally commented I appear to have clicked the
-Notify me when new comments are added- checkbox and now each
time a comment is added I receive four emails with the same comment.
There has to be a means you can remove me from that service?
Appreciate it!
The new version, named Lucky Larry’s Lobstermania 2 is
available in HTML5 format.
That is quite significantly it, with the only slight complication being what
occurs when there’s a tie.
Hi to all, how is everything, I think every one is getting more from
this website, and your views are nice for new viewers.
I have been surfing online more than three hours nowadays, but I
never found any interesting article like yours.
It’s beautiful price enough for me. In my opinion, if all site owners and bloggers made excellent content material as you did, the net will probably be
much more helpful than ever before.
Point spread betting asks you to pick the
winner of a game with a line set by oddsmakers factored into the final
score.
Our 30,000 square foot meeting & entertainment center, Cowlitz Ballroom, plays
host to some of the largest national acts you wont want
to miss.
They bet tie only when the circumstances are proper for tie repeats.
The Malta-primarily based firm became publicly traded in Sweden when it was spun out of Unibet in 2014.
you are truly a excellent webmaster. The website loading velocity is incredible.
It seems that you’re doing any distinctive trick.
Furthermore, The contents are masterpiece. you’ve
performed a fantastic process in this subject!
I like the helpful info you provide in your articles.
I will bookmark your weblog and check again here frequently.
I’m quite certain I’ll learn many new stuff right here!
Good luck for the next!
Bonus bet stake is not incorporated in any winnings and
winnings are paid in money.
I’m not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or understanding more.
Thanks for fantastic information I was looking for this information for my mission.
What’s up, I log on to your blogs on a regular basis. Your writing style is awesome, keep doing what you’re doing!
Every weekend i used to pay a visit this web page, for the reason that
i wish for enjoyment, as this this web page conations truly nice funny information too.
Hello I am so delighted I found your blog, I really found
you by accident, while I was looking on Google for something else, Anyways I am here now and would just like to say kudos for a marvelous post and
a all round interesting blog (I also love the theme/design), I
don’t have time to go through it all at the minute but I
have book-marked it and also included your RSS feeds, so when I have time I will be back to read much more,
Please do keep up the awesome jo.
Currently it appears like Expression Engine
is the best blogging platform out there right now.
(from what I’ve read) Is that what you are using on your blog?
Hurrah, that’s what I was looking for, what a material!
present here at this webpage, thanks admin of this site.
I like what you guys are up too. Such clever work and coverage!
Keep up the awesome works guys I’ve incorporated you guys
to our blogroll.
Hi there, just became alert to your blog through Google, and found that it’s really informative.
I’m going to watch out for brussels. I will appreciate if you continue this in future.
Numerous people will be benefited from your writing.
Cheers!
Wonderful blog! Do you have any tips for aspiring writers?
I’m hoping to start my own website soon but I’m a little lost
on everything. Would you advise starting with a
free platform like WordPress or go for a paid option?
There are so many options out there that I’m completely
confused .. Any ideas? Thank you!
I must thank you for the efforts you have put in penning
this blog. I am hoping to view the same high-grade content from you in the future as well.
In fact, your creative writing abilities has motivated me to get my own website now ;)
WOW just what I was looking for. Came here by searching for website
I have read a few excellent stuff here. Definitely price bookmarking for revisiting.
I surprise how so much effort you put to make one of these wonderful informative site.
Hi, i think that i saw you visited my website so i came to “return the favor”.I am trying to find things to improve my web site!I suppose
its ok to use some of your ideas!!
This is really interesting, You’re a very skilled blogger.
I’ve joined your rss feed and look forward to seeking more
of your fantastic post. Also, I have shared your website in my social
networks!
Hi, all is going well here and ofcourse every one is sharing
facts, that’s actually good, keep up writing.
I’m really impressed with your writing skills as
well as with the layout on your weblog. Is this a paid theme or did you modify it yourself?
Anyway keep up the nice quality writing, it is rare to see a nice blog like this one
nowadays.
What a material of un-ambiguity and preserveness
of valuable experience about unpredicted feelings.
Excellent article. Keep writing such kind of information on your page.
Im really impressed by your blog.
Hey there, You have performed an incredible job. I’ll definitely
digg it and in my opinion recommend to my friends. I am confident they’ll
be benefited from this web site.
Howdy just wanted to give you a quick heads up
and let you know a few of the pictures aren’t loading correctly.
I’m not sure why but I think its a linking issue. I’ve tried it in two different web
browsers and both show the same outcome.
Howdy! This article could not be written much better! Looking through this post reminds
me of my previous roommate! He always kept preaching about this.
I am going to forward this information to him.
Pretty sure he’ll have a good read. Thanks for sharing!
Hi, all is going perfectly here and ofcourse every one is sharing information, that’s genuinely fine, keep up writing.
I savour, cause I found exactly what I used to
be taking a look for. You have ended my four
day lengthy hunt! God Bless you man. Have a nice day.
Bye
Hey! Would you mind if I share your blog
with my myspace group? There’s a lot of folks that I think would really appreciate your content.
Please let me know. Thank you
May I just say what a comfort to find somebody who genuinely knows what they’re
talking about on the web. You actually understand how to bring an issue
to light and make it important. A lot more
people really need to check this out and understand this
side of the story. It’s surprising you are not more popular
given that you definitely possess the gift.
It’s awesome to go to see this website and reading the
views of all mates regarding this article,
while I am also eager of getting knowledge.
If you want to grow your knowledge just keep visiting this website
and be updated with the most recent news posted here.
Hi to every body, it’s my first pay a quick visit of this website; this webpage contains awesome and genuinely fine
material designed for readers.
Nice post. I used to be checking constantly this weblog and I’m inspired!
Extremely helpful information specially the closing part
:) I maintain such info much. I was seeking this particular
info for a very long time. Thanks and good luck.
Hey there, You’ve done an excellent job. I’ll definitely digg it and personally recommend to my
friends. I am confident they will be benefited from this site.
Its such as you read my thoughts! You appear to understand so much about this, like you wrote the guide in it
or something. I feel that you simply can do with some % to force the message house a little bit, but other than that, that
is great blog. A fantastic read. I will certainly be back.
I was recommended this website by my cousin. I am not sure whether this post is written by him as no one else know such detailed about
my trouble. You are incredible! Thanks!
Nice post. I was checking constantly this weblog and I’m impressed!
Very useful information particularly the remaining
phase :) I take care of such info a lot. I used to be seeking this particular
information for a long time. Thanks and good luck.
This is really fascinating, You’re a very professional
blogger. I have joined your rss feed and sit up for searching for more of your magnificent post.
Also, I have shared your web site in my social networks
You’ve made some good points there. I checked on the net for more
information about the issue and found most people will go along with your views on this website.
There’s nowt so queer as folk.
These are genuinely great ideas in on the topic of
blogging. You have touched some fastidious factors here.
Any way keep up wrinting.
Time and Patience would bring the snail to Jerusalem.
Hi to every one, it’s in fact a good for me to pay a quick visit this website, it
includes priceless Information.
Heya i’m for the primary time here. I came
across this board and I find It really useful & it helped
me out a lot. I’m hoping to give something back and aid others such
as you helped me.
Hmm is anyone else having problems with the images on this
blog loading? I’m trying to determine if its a problem on my
end or if it’s the blog. Any suggestions would be greatly appreciated.
games ps4 185413490784 games ps4
Hello to all, how is the whole thing, I think every one is getting more
from this web page, and your views are good in support of
new people. ps4 games allenferguson ps4 games
Inspiring story there. What occurred after?
Take care!
I really love your blog.. Great colors & theme. Did you develop this web site yourself?
Please reply back as I’m planning to create my own personal blog and
would love to know where you got this from or what the theme is named.
Thank you!
Definitely believe that which you said. Your favorite reason appeared to be on the net the easiest thing to be aware of.
I say to you, I definitely get irked while people think about worries that
they just do not know about. You managed to
hit the nail upon the top as well as defined out the whole thing without having side
effect , people could take a signal. Will likely be back to get
more. Thanks
This post is actually a fastidious one it helps new net viewers, who are wishing in favor of blogging.
At this time it sounds like Drupal is the top blogging platform available right now.
(from what I’ve read) Is that what you are using
on your blog?
Quality content is the secret to invite the visitors to visit the web site, that’s what this web site
is providing.
[url=https://ljcialishe.com/]tadalafil cialis[/url] [url=https://cialisvja.com/]how cialis works[/url] [url=https://viagraonlinejc.com/]canada pharmacy viagra[/url] [url=https://viagratx.com/]purple viagra[/url] [url=https://buycialisxz.com/]canadian pharmacy ezzz cialis[/url]
[url=https://kloviagrli.com/]cocaine and viagra[/url] [url=https://vigedon.com/]is sildenafil as good as viagra?[/url] [url=https://llecialisjaw.com/]us pharmacy prices for cialis[/url] [url=https://jwcialislrt.com/]is there a generic for cialis[/url] [url=https://jecialisbn.com/]cialis buy[/url]
Sweet blog! I found it while surfing around on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I’ve been trying for a while but I never seem to get there!
Cheers
you are truly a excellent webmaster. The website loading speed is amazing.
It kind of feels that you are doing any unique trick.
Moreover, The contents are masterwork. you have done a
wonderful process in this topic! asmr 0mniartist