PART2RELATIONALDATABASESChapter3SQLMarch2009DatabaseSystemConcepts-Chapter3SQL-3UsageofSQLdatadefinition:§3.2,DDLdataquery/retrieve:§3.3——§3.8,Selectclausedatamanipulation:§3.9ModificationoftheDatabaseThreePartsinChapter3March2009DatabaseSystemConcepts-Chapter3SQL-4DatabasequerylanguagescommercialimplementationofrelationaloperationsinDBSinteractivetoolsforuserstodevelop,use/access,andmaintainDBSDBSaccess:create,retrieval,insert,delete,update,etc“Query”generalizeddefinitiondefine,retrieve,modify,controletc.onDB§3.1BackgroundMarch2009DatabaseSystemConcepts-Chapter3SQL-5SQLStructuredQueryLanguageonthebasisoftherelationalalgebraandthetuplerelationalcalculusfirstimplementedinSystemRbyIBMin1970sstandardizedbyANSIandISO,SQL-86,SQL-89,SQL-92,SQL-99,OO-SQL,themostrecentversionisSQL-2003widelyusedforcommercialDBS3.1Background(cont.)March2009DatabaseSystemConcepts-Chapter3SQL-6Parts/functionsofSQLdatadefinitionlanguage(DDL)define,delete,modifyonschemas,viewsandindexinteractivedata-manipulationlanguage(DML)query/retrieve,insert,delete,updateontuplesinDBdatacontrolintegrityconstraintsspecifyingauthorization:securitycontrol,specifyingaccessrightstransactionmanagementembeddedanddynamicSQL3.1Background(cont.)March2009DatabaseSystemConcepts-Chapter3SQL-79basicoperatorsinSQL3.1Background(cont.)datamanipulationSelect(onrelations)Insert,Delete,Update(onrelations)datadefinitionCreate,Drop,Alter(onschema)datacontrolGrant,Revoke(inChapter4)March2009DatabaseSystemConcepts-Chapter3SQL-8Casestudyusedinthischapterreturn3.1Background(cont.)Fig.3.1SchemaofbankingenterpriseMarch2009DatabaseSystemConcepts-Chapter3SQL-9DDLinSQLallowsthespecificationofinformationabouteachrelation,includingtheschemaforeachrelationorview-----createtable/viewthedomainofvaluesassociatedwitheachattributeintegrityconstraintsthesetofindicestobemaintainedforeachrelationssecurityandauthorizationinformationforeachrelationthephysicalstoragestr...