Creating an ODBC Data Source Name
Creating an ODBC Data Source Name
An ODBC data source is an ODBC data structure that identifies a database and the DBMS that processes it. Data sources identify other types of data, such as spreadsheets and other nondatabase tabular data stores, but we are not concerned with that use here.
The three types of data sources are file, system, and user. A file data source is a file that can be shared among database users. The only requirement is that the users have the same DBMS driver and privilege to access the database. The data source file can be e-mailed or otherwise distributed to possible users. A system data source is one that is
Figure 11-6
Minimum SQL Grammar
Summary of SQL
• CREATE TABLE, DROP TABLE
Conformance Levels
• Simple SELECT (does not include subqueries) • INSERT, UPDATE, DELETE • Simple expressions (A > B + C) • CHAR, VARCHAR, LONGVARCHAR data types
Core SQL Grammar
• Minimum SQL Grammar • ALTER TABLE, CREATE INDEX, DROP INDEX • CREATE VIEW, DROP VIEW • GRANT, REVOKE • Full SELECT (includes subqueries) • Aggregate functions such as SUM, COUNT, MAX, MIN, AVG • DECIMAL, NUMERIC, SMALLINT, INTEGER, REAL, FLOAT,
DOUBLE PRECISION data types
Extended SQL Grammar
• Core SQL Grammar • Outer joins • UPDATE and DELETE using cursor positions • Scalar functions such as SUBSTRING, ABS • Literals for date, time, and timestamp • Batch SQL statements • Stored procedures
Chapter 11 The Web Server Environment
local to a single computer. The operating system and any user on that system (with proper privileges) can use a system data source. A user data source is available only to the user who created it.
In general, the best choice for Internet applications is to create a system data source on the Web server. Browser users then access the Web server, which, in turn, uses the system data source to set up a connection with the DBMS and the database.
We need a system data source for the View Ridge Gallery VRG database so that we can use it in a Web database processing application. We created the VRG database in SQL Server 2008 R2, and the system data source will provide a connection to the SQL Server 2008 R2 DBMS. To create a system data source in a Windows operating system, you use the ODBC Data Source Administrator. 1
Opening the ODBC Data Source Administrator in Windows Server 2008 R2
1. Click the Start button and then click the All Programs button.
2. Click the Administrative Tools folder to open it.
3. Click the Data Sources (ODBC) program. We can now use the ODBC Data Source Administrator to create a system data source
named VRG for use with SQL Server 2008 R2: Creating the VRG System Data Source
1. In the ODBC Data Source Administrator, click the System DSN tab, and then click the Add button.
2. In the Create New Data Source dialog box, we need to connect to SQL Server 2008 R2, so we select the SQL Server Native Client 10, as shown in Figure 11-7.
3. Click the Finish button. The Create New Data Source to SQL Server dialog box appears.
4. In the Create New Data Source to SQL Server dialog box, enter the information shown for the VRG in Figure 11-8(a) (note that the database server is selected from the Server drop-down list), and then click the Next button.
Parts
» This page intentionally left blank
» Reporting and Data Mining Database Applications
» Database Applications and SQL
» Reading Specified Columns and Rows from a Single Table
» “Does Not Work with Microsoft Access ANSI-89 SQL”
» Processing SQL Statements in Microsoft Access 2010
» Using SQL in Microsoft SQL Server 2008 R2
» Using SQL in Oracle Database 11g
» Using SQL in Oracle MySQL 5.5
» Wildcards in SQL WHERE Clauses
» Using SQL Built-in Functions
» SQL Expressions in SQL SELECT Statements
» Querying Multiple Tables with Subqueries
» Querying Multiple Tables with Joins
» Comparing Subqueries and Joins
» Finding Functional Dependencies
» Eliminating Anomalies from Multivalued Dependencies
» The Multivalue, Multicolumn Problem
» The General-Purpose Remarks Column
» R Diagrams Using the IE Crow’s Foot Model
» The Multivalued Attribute Pattern
» The Archetype/Instance Pattern
» The Student Acceptance Letter
» X This is a warning, no further action is required.
» 1:1 Relationships Between Strong Entities
» M Relationships Between Strong Entities
» Relationships in Mixed Entity Designs
» Representing Ternary and Higher-Order Relationships
» Relational Representation of the Highline University Data Model
» Surrogate Key Database Design
» Column Properties for the View Ridge Database Design Tables
» Variations in SQL Data Types
» Implementing Data Constraints
» Populating the View Ridge Database Tables
» Using Triggers to Provide Default Values
» The WORK_AddWorkTransaction Stored Procedure
» • If a PROJECT row is deleted, then the project has been canceled, and it is unneces-
» Reducing Cardinalities (with Data Loss)
» Optimistic Versus Pessimistic Locking
» Declaring Lock Characteristics
» Processing Rights and Responsibilities
» Recovery via Rollback/Rollforward
» Maintaining the Data Repository
» Types of Distributed Databases
» • Express Edition. This free, feature-limited version is available for download. It
» SQL Server 2008 R2 SQL Statements and SQL Scripts
» Creating the View Ridge Database Table Structure
» Populating the VRG Tables with Data
» The Stored Procedure InsertCustomerAndInterests
» The Stored Procedure InsertCustomerWithTransaction
» A Trigger for Setting Default Values
» A Trigger for Enforcing a Data Constraint
» A Trigger for Enforcing a Required Child Constraint
» Creating an ODBC Data Source Name
» Materializing XML Documents with XSLT
» Using the SQL SELECT . . . FOR XML Statement
» Multitable SELECT with FOR XML
» A Schema with Two Multivalued Paths
» Problems with Operational Data
» Using SQL for Market Basket Analysis
Show more