1. Trang chủ
  2. » Công Nghệ Thông Tin

Hướng dẫn học Microsoft SQL Server 2008 part 166 ppsx

10 171 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 1,43 MB

Nội dung

Nielsen c76.tex V4 - 07/21/2009 4:28pm Page 1612 Part X Business Intelligence Optionally, a Name column property can also be specified, giving the key values friendly names for the end user (e.g., June 2008 instead of 2008-06-01T00:00:00). However, data min- ing uses the Name column’s data type instead of the Key column’s data type, often resulting in unexpected text data types showing up in a mining structure. Sometimes the text data type works fine, but for other cases, especially Key Time or Key Sequence attributes, it can cause the mining structure not to build or to behave incorrectly once built. ■ Resolving this issue requires either removing the Name column property from the dimension attribute or adding the same column to the dimension a second time without using the Name column property. If a second copy of the attribute is required, then it can be marked as not visible to avoid confusing end users. ■ The portion of cube data to be used for training is defined via the mining structure’s cube slice. Adjust this slice to exclude cases that should not be used in training (e.g., discontinued products and future time periods). Consider reserving a portion of the cube data for model evaluation (e.g., train a forecast on 18 of the last 24 months of data and compare actual and forecast values for the final six months). ■ A lift chart cannot be run against cube test data, so model evaluation requires either test data in a relational table or some strategy that does not rely on the tools of the Mining Accuracy Chart. Using a cube as a mining data source can be very effective, providing access to what is often large quan- tities of data for training and testing, and providing the ability to create a dimension or even an entire cube based on the trained model. Summary Data mining provides insights into data well beyond those provided by reporting, and Analysis Services streamlines the mining process. While the data must still be prepared, mining models hide the statistical and algorithmic details of data mining, enabling the modeler to focus on analysis and interpretation. Beyond one-time insights, trained models can be used in applications to allocate scarce resources, fore- cast trends, identify suspect data, and a variety of other uses. This book has been quite the journey — from a foundation of Smart Database Design and normaliza- tion, through selects, aggregating data, joins, and merge. Microsoft has steadily extended SQL Server’s capability to handle data beyond the traditional relational data type, but SQL queries and T-SQL pro- gramming are still the power of SQL Server. Several chapters detailed setting up, configuring, maintain- ing, and securing SQL Server. Part IX looked into the black art of indexing and tuning. At the close, SQL Server’s BI features, with Analysis Services at the core, showed how to build cubes and data mine for insights. The analogy of SQL Server as a box has been woven throughout the part introductions, so it makes sense to close with that analogy. The informal motto for database design and normalization is ‘‘the key, the whole key, and nothing but the key.’’ If SQL Server is the box, then think ‘‘the box, the whole box, and nothing but the box.’’ 1612 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1613 SQL Server 2008 Specifications IN THIS APPENDIX Comparison of SQL Server specifications for versions 6.5 through 2008 T able A-1 provides a thorough and complete listing of all the different versions of SQL Server specifications. TABLE A-1 SQL Server Specifications Feature 6.5 7.0 2000 2005 2008 Server Features Automatic Configuration No Yes Yes Yes Yes Page Size 2 KB 8 KB 8 KB 8 KB + extendable 8KB+ extendable Max Row Size 1,962 bytes 8,060 bytes 8,060 bytes 8,060 bytes extendable based on data types 8,060 bytes extendable based on data types Page-Level Locking Yes Yes Yes Yes Yes Row-Level Locking Insert only Yes Yes Yes Yes Files Located Devices Files and filegroups Files and filegroups Files and filegroups Files and filegroups 1613 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1614 A SQL Server 2008 Specifications TABLE A-1 (continued ) Feature 6.5 7.0 2000 2005 2008 Kerberos and Security Delegation No No Yes Yes Yes C2 Security Certification No No Yes Yes Yes Common Criteria Certification No No No Yes Yes Bytes per Character Column 255 8,000 8,000 8,000 8,000 Automatic Log Shipping No No Yes Yes Yes Persisted Computed Column No No No Yes Yes Max Batch Size 128 KB 65,536 * network packet–size bytes 65,536 * network packet–size bytes 65,536 * network packet–size bytes 65,536 * network packet–size bytes Bytes per Text/Image 2GB 2GB 2GB 2GB 2f Bytes per VarChar(max) –––2GB2GB Objects in Database 2 billion 2,147,483,647 2,147,483,647 2,147,483,647 2,147,483,647 Parameters per Stored Procedure 255 1,024 1,024 1,024 2,100 References per Table 31 253 253 253 253 Rows per Table Limited by available storage Limited by available storage Limited by available storage Limited by available storage Limited by available storage Tables per Database 2 billion Limited by number of objects in database Limited by number of objects in database Limited by number of objects in database Limited by number of objects in database 1614 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1615 SQL Server 2008 Specifications A TABLE A-1 (continued ) Feature 6.5 7.0 2000 2005 2008 Tables per SELECT Statement 16 256 256 256 256 Triggers per Table 3 Limited by number of objects in database Limited by number of objects in database Limited by number of objects in database Limited by number of objects in database Bytes per GROUP BY or ORDER BY 900 8,060 8,060 8,060 8,060 Bytes of Source Text per Stored Procedure 65,025 Batch size or 250 MB, whichever is less Batch size or 250 MB, whichever is less Batch size or 250 MB, whichever is less Batch size or 250 MB, whichever is less Columns per Key (Index, Foreign, or Primary) 16 16 16 16 19 Bytes per Key (Index, Foreign, or Primary) 900 900 900 900 900 Columns in GROUP BY or ORDER BY 16 Limited by bytes Unspecified Unspecified Unspecified Columns per Table 255 1,024 1,024 1,024 1,024 (w/Sparse Columns 30,000) Columns per SELECT Statement 4,096 4,096 4,096 4,096 4,096 Columns per INSERT Statement 250 1,024 1,024 1,024 4,096 Database Size 1 TB 1,048,516 TB 1,048,516 TB 524,272 TB 524,272 TB Databases per Server 32,767 32,767 32,767 (per instance) 32,767 (per instance) 32,767 (per instance) File Groups per Database – 256 256 256 32,767 1615 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1616 A SQL Server 2008 Specifications TABLE A-1 (continued ) Feature 6.5 7.0 2000 2005 2008 Files per Database 32 32,767 32,767 32,767 32,767 Data-File Size 32 GB 32 TB 32 TB 16 TB 16 TB Log-File Size 32 GB 4 TB 32 TB 2 TB 2 TB Foreign-Key References per Table 16 253 253 253 253 Identifier Length (Table, Column Names, etc.) 30 128 128 128 128 XML Indexes – – – 249 249 Instances per Server 111616(Standard) 50 (Enterprise) 50 (32 bit Workgroup limited to 16 instances) Locks per Instance 2,147,483,647 2,147,483,647 or 40 percent of SQL Server memory 2,147,483,647 or 40 percent of SQL Server memory 32 bit: 2,147,483,647 or 40 percent of SQL Server memory 64 bit: limited only by memory 32 bit: 2,147,483,647 or 40 percent of SQL Server memory 64 bit: limited only by memory Parallel Query Execution No Yes Yes Yes Yes Federated Databases No No Yes Yes Yes Indexes per Table Used in Query Execution 1 Multiple Multiple Multiple Multiple Administration Features Automatic-Data and Log-File Growth No Yes Yes Yes Yes Automatic Index Statistics No Yes Yes Yes Yes 1616 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1617 SQL Server 2008 Specifications A TABLE A-1 (continued ) Feature 6.5 7.0 2000 2005 2008 Profiler Tied to Optimizer Events No Yes Yes Yes Yes Alert on Performance Conditions No Yes Yes Yes Yes Conditional Multistep Agent Jobs No Yes Yes Yes Yes Programming Features Recursive Triggers No Yes Yes Yes Yes Multiple Triggers per Table Event No Yes Yes Yes Yes INSTEAD OF Triggers No No Yes Yes Yes Unicode Character Support No Yes Yes Yes Yes User-Defined Functions No No Yes Yes Yes Indexed Views No No Yes Yes Yes Cascading DRI Deletes and Updates No No Yes Yes Yes Collation Level Server Server Server, database, table, query Server, database, table, query Server, database, table, query Nested Stored- Procedure Levels 16 32 32 32 32 Nested Subqueries 16 32 32 32 32 Nested Trigger Levels 16 32 32 32 32 1617 www.getcoolebook.com Nielsen bapp01.tex V4 - 07/23/2009 11:33am Page 1618 A SQL Server 2008 Specifications TABLE A-1 (continued ) Feature 6.5 7.0 2000 2005 2008 XML Support No No Yes Yes Yes Replication Features Snapshot Replication Yes Yes Yes Yes Yes Transactional Replication Yes Yes Yes Yes Yes Merge Replication with Conflict Resolution No Yes Yes Yes Yes Enterprise Manager/Management Studio Features Database Diagram No Yes Yes Yes Yes Graphical Table Creation Yes Yes Yes Yes Yes Database Designer No Yes Yes Yes Yes Query Designer No Yes Yes Yes Yes T-SQL Debugger No Yes Yes No Yes IntelliSense No No No No Yes Multi-Server Queries No No No No Yes SQL Server 2008 Edition Features Table The best thing for you to do if you’re looking for a list of features is to go to: www.microsoft.com/ sqlserver/2008/en/us/editions-compare.aspx or http://msdn.microsoft.com/ en-us/library/cc645993.aspx . The table is already organized and set up in the best possible fashion; if I reorganized it for the sake of reprinting it, it would lose its usability. 1618 www.getcoolebook.com Nielsen bapp02.tex V4 - 07/23/2009 5:01pm Page 1619 Using the Sample Databases IN THIS CHAPTER The file list, background, requirements, diagrams, and descriptions for the five sample databases I n addition to Microsoft’s AdventureWorks sample database, this book draws examples from the following five sample databases, each designed to illustrate a particular design concept or development style: ■ Cape Hatteras Adventures is actually two sample databases that together demonstrate upsizing to a relational SQL Server database. Version 1 consists of a simple Access database and an Excel spreadsheet — neither of which is very sophisticated. Version 2 is a typical small- to mid-size SQL Server database employing identity columns and views. It uses an Access project as a front end and publishes data to the Web using the SQL Server Web Publishing Wizard and stored procedures. ■ The OBXKites database tracks inventory, customers, and sales for a fictitious kite retailer with four stores in North Carolina’s Outer Banks. This database is designed for robust scalability. It employs GUIDs for replication and Unicode for international sales. In various chapters in the book, partitioned views, full auditing features, and Analysis Services cubes are added to the OBXKites database. ■ The Family database stores family tree history. While the database has only two tables, person and marriage, it sports the complexities of a many-to-many self-join and extraction of hierarchical data. ■ Twenty-five of Aesop’s Fables provide the text for Chapter 19, ‘‘Using Integrated Full-Text Search.’’ This appendix documents the required files (Table B-1) and the database schemas for the sample databases. 1619 www.getcoolebook.com Nielsen bapp02.tex V4 - 07/23/2009 5:01pm Page 1620 B Using the Sample Databases All the files to create these sample databases, and chapter code files, can be downloaded from www.sqlserverbible.com. The Sample Database Files The sample files should be installed into the C:\SQLServerBible directory. The SQL Server sample web applications are coded to look for template files in a certain directory structure. The DTS packages and distributed queries also assume that the Access and Excel files are in that directory. TABLE B-1 Sample Database Files Cape Hatteras Adventures Version 2 C:\SQLServerBible\Sample Databases\CapeHatterasAdventures CHA2_Create.sql Script that generates the database for Cape Hatteras Adventures Version 2, including tables, constraints, indexes, views, stored procedures, and user security CHA_Convert.sql Distributed queries that convert data from Access and Excel into the Cape Hatteras Adventures Version 2 database. This script mirrors the DTS package and assumes that the Access and Excel source files are in the C:\SQLServerBible directory. CHA1_Customers.mdb Access database of the customer list, used prior to SQL Server conversion. Data is imported from this file into the CHA1 SQL Server database. CHA1_Schdule.xls Excel spreadsheet of events, tours, and guides, used prior to SQL Server conversion. Data is imported from this file into the CHA1 SQL Server database. CHA2_Events.xml Sample XML file CHA2_Events.dtd Sample XML Data Type Definition file CHA2.adp Sample Access front end to the CHA2 database OBXKites C:\SQLServerBible\Sample Databases\OBXKites OBXKites_Create.sql Script that generates the database for the OBXKites database, including tables, views, stored procedures, and functions 1620 www.getcoolebook.com Nielsen bapp02.tex V4 - 07/23/2009 5:01pm Page 1621 Using the Sample Databases B TABLE B-1 (continued ) OBXKites_Populate.sql Script that populates the database for the OBXKites database with sample data by calling the stored procedures OBXKites_Query.sql A series of sample test queries with which to test the population of the OBXKites database The Family C:\SQLServerBible\Sample Databases\Family Family_Queries.sql Script that creates the Family database tables and stored procedures and populates the database with sample data Family_Create.sql A set of sample queries against the Family database AESOP’S FABLES C:\SQLServerBible\Sample Databases\Aesop Aesop_Create.sql Script that creates the Aesop database and Fable table and populates the database with 25 of Aesop’s fables. This sample database is used with full-text search Aesop.adp Access front end for browsing the fables MATERIAL SPECIFICATIONS C:\SQLServerBible\Sample Databases\MaterialSpec MS_Create.sql Script to create the Material Specification database MS_Populate.sql Script to populate the Material Specification to database with sample data from a computer-clone store To create one of the sample databases, run the create script within Query Analyzer. The script will drop the database if it exists. These scripts make it easy to rebuild the database, so if you want to exper- iment, go ahead. Because the script drops the database, no connections to the database can exist when the script is run. Enterprise Manager will often keep the connection even if another database is selected. If you encounter an error, chances are good that Enterprise Manager, or a second connection in Query Analyzer, is holding an open connection. Cape Hatteras Adventures Version 2 The fictitious Cape Hatteras Adventures (CHA) is named for the Cape Hatteras lighthouse in North Carolina, one of the most famous lighthouses and life-saving companies in America. Cape Hatteras is 1621 www.getcoolebook.com . merge. Microsoft has steadily extended SQL Server s capability to handle data beyond the traditional relational data type, but SQL queries and T -SQL pro- gramming are still the power of SQL Server. . APPENDIX Comparison of SQL Server specifications for versions 6.5 through 2008 T able A-1 provides a thorough and complete listing of all the different versions of SQL Server specifications. TABLE A-1 SQL Server. Server memory 2,147,483,647 or 40 percent of SQL Server memory 32 bit: 2,147,483,647 or 40 percent of SQL Server memory 64 bit: limited only by memory 32 bit: 2,147,483,647 or 40 percent of SQL Server memory 64 bit: limited

Ngày đăng: 04/07/2014, 09:20

TỪ KHÓA LIÊN QUAN