商品簡介
《臨沂大學優秀校本教材:實用數據庫技術》內容的組織以關系數據庫理論知識為基礎,注重操作技能的培養和實際問題的解決,旨在使學生掌握Microsoft SQL Server 2008的使用和管理。
名人推薦
《臨沂大學優秀校本教材:實用數據庫技術》由山東人民出版社出版。
目次
君子務本,本立而道生——《臨沂大學優秀校本教材》總序 韓延明
Introduction to SQL Server
Unit 1 What Makes Up a SQL Server Database?
1.1 An Overview of Database Obiects
1.2 The Database Object
1.3 SQL Server Identifiers for Objects
Summary
Exercises
Unit 2 How to Use Tools of SQL Server
2.1 Creating a Database in Microsoft SQL Server
2.2 The Query Editor
2.3 Entering a SQL Query or Statement
2.4 The Scripts of SQL Server2005_load. sql
Review Questions
Exercises
Uint 3 The Foundation Statements of T-SQL
3.1 Getting Started with a Basic SELECT Statement
3.2 Adding Data with the INSERT Statement
3.3 Changing What You've Got with the UPDATE Statement
3.4 The DELETE Statement
Summary
Review Questions
Exercise
Unit 4 Joins
4.1 INNER JOIN
4.2 The OUTER JOIN
4.3 CROSS JOINs
Summary
Review Questions
Exercises
Unit 5 Subquery
5.1 What Is a Subquery?
5.2 Introducing Set Operations
Summary
Review Questions
Exercises
Unit 6 Creating and Altering Tables
6.1 Object Names in SQL Server
6.2 CREATE DATABASE
6.3 Data Types in SQL Server
6.4 Creating a Table
6.5 The ALTER TABLE Command
Summary
Review Questions
Exercises
Unit 7 Functions
Unit 8 Indexes and Constraints on Tables
Unit 9 Views
Unit 10 Programming Basics and Stored Procedures
Unit 11 Triggers
Unit 12 User Defined Functions
Unit 13 Transactions
Summary
Exercises
References
書摘/試閱
16. What characters or symbols are most commonly used as wildcard characters in SQL Server 2005?
17. What is the concatenation operator in Server SQL 2005?
18. What does the YEAR function do?
19. What does the MONTH function do?
20. What does the GEtdATE function do?
21. What will the following query produce in SQL Server 2005?
SELECT ('……' + names) AS [names]
FROM Employee
22. Does Server SQL allow an expression like COUNT(DISTINCT column_name)?
23. How is the ISNULL function different from the NULLIF function?
24. What function would you use to round a value to three decimal places?
25. Which functions can the WITH TIES option be used with?
26. What clause does the WITH TIES option require?
27. What is the default date format in SQL Server 2005?
28. How do dates have to be entered in Server SQL 2005?
29. What function is used to convert between data types?
30. What function is useful for formatting numbers?
31. What function is useful for formatting dates?
Exercises
Unless specified otherwise,use the Student_course database to answer the following questions.Also,use appropriate column headings when displaying your output.
1. Display the COUNT of tuples (rows) in each of the tables Grade_report,Student,and Section.How many rows would you expect in the Cartesian product of all three tables?Display the COUNT (not the resulting rows) of the Cartesian product of all three and verify your result (use SELECT COUNT(*)…).
2. Display the COUNT of section-ids from the Section table.Display the COUNT of DISTINCT section-ids from the Grade_report table.What does this information tell you?(Hint:section_id is the primary key of the Section table. )
3. Write,execute,and print a query to list student names and grades (just two attributes) using the table alias feature.Restrict the list to students that have either As or Bs in courses with ACCT prefixes only.