版权信息书 名: 深入浅出SQL(影印版)
作者:(美国)贝里
出版社:东南大学出版社
出版时间: 2008
ISBN: 9787564111380
开本: 16
定价: 98.00 元
内容简介你将从本书学到什么?
在如今的世界,数据就是力量,但是成功的真正秘诀却是管理你的数据的力量。《深入浅出SQL》带你进入SQL语言的心脏地带,从使用INSERT和SELECT这些基本的查询语法到使用子查询(subquery)、连接(join)和事务(transaction)这样的核心技术来操作数据库。到读完本书之时,你将不仅能够理解高效数据库设计和创建,还能像一个专家那样查询、归一(normalizing)和联接数据。你将成为数据的真正主人。
为什么本书看起来如此不同?
我们认为你的时间如此宝贵以至于不应该花费在为新概念伤脑筋上面。《深入浅出SQL》用最新的认知科学和学习理论打造多感官的学习体验,它运用丰富的视觉形式激发你的大脑工作,而不是密密麻麻的文字让你看了昏昏欲睡。
编辑推荐“这本书不是让SQL变得容易,而是让SQL变得有挑战性,变得有趣,变得好玩。本书甚至回答了那个老问题:如何讲解无关联子查询而不会因此失去活下去的愿望?本书是正确的学习途径——快速、活泼、而且看上去很酷。”
——AndrewCumming,《SQLHacks》的作者,sqlzoo.net的管理员
“有些书你会买,有些你会保存,有些你会放在案头,感谢O’Reilly和HeadFirst团队开创了终极的HeadFirst(深入浅出)系列。这个系列的书籍会被逐页翻阅,变得皱皱巴巴并被随身携带。《深入浅出SQL》在我的书堆的顶端。”
——BillSawyer,ATG培训经理,Oracle
作者介绍Lynnisafictionwriterstuckinatechnicalbookwriter'sbody.Upondiscoveringthattechnicalbookwritingactuallypaidrealmoney,shelearnedtoacceptandenjoyit.
AftergoingbacktoschooltogetaMastersincomputerscience,sheworkedfortheacronymsNRLandLANL.ThenshediscoveredFlash,andwroteherfirstbestseller.
目录Intro
WhoiSthisbookfor?
Weknowwhatyou’rethinking
Metacognition
Bendyourbrainintosubmission
Readmc
Thetechnicalreviewteam
Acknowledgments
1DataandTables:Aplaceforeverything
Definingyourdata
Lookatyourdataincategories
What'sinadatabase?
Yourdatabaseviewedthroughx-rayspecs
Databasescontainconnecteddata
TablesUpClose
Takecommand!
Settingthetable:theCREATETABLEstatement
Creatingamorecomplicatedtable
LookhoweasyitistowriteSQL
Createthemycontactstable,finally
Yourtableisready
Takeameetingwithsomedatatypes
Yourtable,DESCribed
Youcan'trecreateanexistingtableordatabase!
Outwiththeoldtable,inwiththenew
Toadddatatoyourtable,you'llusetheINSERTstatement
CreatetheINSERTstatement
VariationsonanINSERTstatement
Columnswithoutvalues
PeekatyourtablewiththeSELECTstatement
SQLExposed:ConfessionsofaNULL
ControllingyourinnerNULL
NOTNULLappearsinDESC
FillintheblankswithDEFAULT
YourSQLToolbox
2TheSELECTStatement:Gifteddataretrieval
Dateornodate?
AbetterSELECT
Whatthe*isthat?
Howtoqueryyourdatatypes
Morepunctuationproblems
Unmatchedsinglequotes
Singlequotesarespecialcharacters
INSERTdatawithsinglequotesinit
SELECTspecificcolumnstolimitresults
SELECTspecificcolumnsforfasterresults
Combiningyourqueries
Findingnumericvalues
SmComparisonOperators
FindingnumericdatawithComparisonOperators
TextdataropingwithComparisonOperators
TobeORnottobe
ThedifferencebetweenANDandOR
UseISNULLtofindNULLs
Savingtimewithasinglekeyword:LIKE
ThecalloftheWild(card)
SelectingrangesusingANDandcomparisonoperators
JustBETWEENus...there'sabetterway
Afterthedates,youareeitherIN...
...oryouareNOTIN
MoreNOT
YourSQLToolbox
3DELETEandUPDATE:Achangewilldoyougood
Clownsarescary
Clowntracking
Theclownsareonthemove
Howourclowndatagetsentered
Bonzo,we'vegotaproblem
GettingridofarecordwithDELETE
UsingournewDELETEstatement
DELETErules
TheINSERT-DELETEtwostep
BecarefulwithyourDELETE
ThetroublewithimpreciseDELETE
ChangeyourdatawithUPDATE
UPDATErules
UPDATEisthenewINSERT-DELETE
UPDATEinaction
Updatingtheclowns'movements
UPDATEyourprices
AllweneedisoneUPDATE
YOurSQLTbolbox
4SmartTableDesign:Whybenormal?
Twofishytables
Atableisallaboutrelationships
Atomicdata
Atomicdataandyourtables
Atomicdatarules
Reasonstobenormal
Thebenefitsofnormaltables
Clownsaren'tnormal
Halfwayto1NF
PRIMARYKEYrules
GettingtoNORMAL
FixingGreg'stable
TheCREATETABLEwewrote
Showmethe
Time-savingcommand
TheCREATETABLEwithaPRIMARYKEY
1,2,3...autoincrementally
AddingaPRIMARYKEYtoanexistingtable
ALTERTABLEandaddaPRIMARYKEY
YourSQLToolbox
5ALTER:Rewritingthepast
6AdvancedSELECT:Seeingyourdatawithneweyes
7Multi-tableDatabaseDesign:Outgrowingyourtable
8JoinsandMulti-tableOperations:Can’twealljustgetalong?
9Subqueries:QueriesWithinQueries
10OuterJoins,SelfJoins,andUnions:Newmaneuvers
11Constraints,Views,andTransactions:Toomanycooksspoilthedatabase
12Security:Protectingyourassets
……