资源描述:
《数据库20100373苏浩辉作业五.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、SchoolofEconomics&BusinessAdministrationChongqingUniversityAssignment#05CourseNameDatabasePrincipleandApplicationNameofStudent苏浩辉StudentID20100373Class01班Major信管InstructorDr.YongLiTutorBowenZhangCompletedTime2012-5-13Score1.WritesomesampleSQLDMLstatementsfortheContinentalPalmsVideoda
2、tabasesystem.Youcanusethesamplesolutionforassignment4tocreatethetables1).WriteSQLINSERTstatementstoentersomesampledataintoaselectedtable.YoumustenteratleastthreerecordsINSERTINTOFilm(F#,Tltle,Kind,Rate)VALUES(0250381970,'AD3','Foreign',0);INSERTINTOFilm(F#,Tltle,Kind,Rate)VALUES(0250
3、381971,'碟中谍','Action',0);INSERTINTOFilm(F#,Tltle,Kind,Rate)VALUES(0250381972,'碟中谍4','Action',0);INSERTINTOForeign_Film(F#,Speak,Subtitle)VALUES(0250381970,'English','Chinese');INSERTINTOCopy_Type(CT_Name,Price,Nights)VALUES('VCD',15,10);INSERTINTOCopy_Type(CT_Name,Price,Nights)VALUES
4、('DVD',25,7);INSERTINTOCopy_Type(CT_Name,Price,Nights)VALUES('BlueDVD',25,5);INSERTINTOCopy(F#,C#,Condition,CT_Name)VALUES(0250381970,2012042501,1,'VCD');INSERTINTOCopy(F#,C#,Condition,CT_Name)VALUES(0250381970,2012042502,1,'VCD');INSERTINTOCopy(F#,C#,Condition,CT_Name)VALUES(0250381
5、970,2012042503,2,'DVD');INSERTINTOCopy(F#,C#,Condition,CT_Name)VALUES(0250381970,2012042504,2,'BlueDVD');2).WriteSQLUPDATEstatementstoupdatesomeinformationinthetable.YoumustwriteatleasttwoUPDATEstatementsUPDATECopysetCondition=4WHEREF#=0250381970ANDC#=2012042501;UPDATECopysetConditio
6、n=3WHEREF#=0250381970ANDC#=2012042504;UPDATECopy_TypesetPrice=30WHERECT_Name='BlueDVD';3).WriteSQLDELETEstatementstodeletesomerecordsfromthetable.YoumustwriteatleasttwoDELETEstatementsDELETEFROMFilmWHEREF#=0250381971;DELETEFROMFilmWHEREF#=0250381972;2.WritesomesamplequeriesusingSQLSE
7、LECTstatementsforthePineValleyFurnituredatabasesystem.Youcanusethescriptfilenamedpine_valley_create.sqlavailableontheG:drive(G:Zhao_Hsba434demospine_valley_furniturepine_valley_create.sql)tocreatethetablesandpopulatethetableswithsampledata.Youarefreetoformatthequeryresultsnicely
8、.1).Getthepr