Documente Academic
Documente Profesional
Documente Cultură
Save disk storage Compression can improve disk I/O and memory utilization Backup Compression
Backup compression enables the backup of a database to be compressed without having to compress the database itself Table-Valued Parameters
Table-Valued Parameters (TVPs) allows stored procedures to accept and return lists of parameters. Microsoft Office 2007
SQL Server Reporting Server reports can now export directly to Word.
1. Transparent Data Encryption. The ability to encrypt an entire database. 2. Backup Encryption. Executed at backup time to prevent tampering. 3. LINQ. Development query language for access multiple types of data such as SQL and XML. 4. Data Synchronizing. Development of frequently disconnected applications. 5. Dates and Times. New data types: Date, Time, Date Time Offset. 6. File Stream. New data type VarBinary(Max) FileStream for managing binary data. 7. Table Value Parameters. The ability to pass an entire table to a stored procedure. 8. MERGE. TSQL command combining Insert, Update, and Delete.
External Key Management. Storing Keys separate from the data. Auditing. Monitoring of data access. Data Compression. Fact Table size reduction and improved performance. Resource Governor. Restrict users or groups from consuming high levels or resources. Hot Plug CPU. Add CPUs on the fly. Performance Studio. Collection of performance monitoring tools. Installation improvements. Disk images and service pack uninstall options. Dynamic Development. New ADO and Visual Studio options as well as Dot Net 3. Entity Data Services. Line Of Business (LOB) framework and Entity Query Language (eSQL)
Spatial Data. Data type for storing Latitude, Longitude, and GPS entries. Full Text Search. Native Indexes, thesaurus as metadata, and backup ability. SQL Server Integration Service. Improved multiprocessor support and faster lookups.
SQL Server Analysis Server. Stack improvements, faster block computations. SQL Server Reporting Server. Improved memory management and better rendering. Microsoft Office 2007. Use OFFICE as an SSRS template. SSRS to WORD. SQL 2000 Support Ends. Mainstream Support for SQL 2000 is coming to an end.
NULL
It doesnt allow Null values. Because of this we refer PRIMARY KEY = UNIQUE KEY + Not Null CONSTRAINT
INDEX index
LIMIT
CREA TE SYNTAX
defining a single column as a PRIMARY single column as a UNIQUE KEY column while KEY column while creating a table: creating a table: CREATE TABLE dbo.Customer CREATE TABLE dbo.Customer ( Id INT NOT NULL PRIMARY KEY, FirstName VARCHAR(100), LastName VARCHAR(100), City VARCHAR(50) ) Below is the Sample example for defining multiple Below is the Sample example for defining multiple columns as PRIMARY KEY. It also shows how we can give name for the PRIMARY KEY: CREATE TABLE dbo.Customer ( CREATE TABLE dbo.Customer ( Id INT NOT NULL, Id INT NOT NULL, FirstName VARCHAR(100) NOT NULL, LastName VARCHAR(100), columns as UNIQUE KEY. It also shows how we can give name for the UNIQUE KEY: ( Id INT NOT NULL UNIQUE, FirstName VARCHAR(100), LastName VARCHAR(100), City VARCHAR(50) )
ALTE R SYNTAX
Below is the Syntax for adding PRIMARY KEY CONSTRAINT on a column when the table is already created and doesnt have any primary key: ALTER TABLE dbo.Customer ADD CONSTRAINT PK_CUSTOMER PRIMA RY KEY (Id)
Below is the Syntax for adding UNIQUE KEY CONSTRAINT on a column when the table is already created: ALTER TABLE dbo.Customer ADD CONSTRAINT UK_CUSTOMER UNIQUE(Id)
DROP SYNTAX
Below is the Syntax for dropping a PRIMARY KEY: ALTER TABLE dbo.Customer DROP CONSTRAINT PK_CUSTOMER
Below is the Syntax for dropping a UNIQUE KEY: ALTER TABLE dbo.Customer DROP CONSTRAINT UK_CUSTOMER
Execution Plan Retention and Reuse (SP are compiled and their execution plan is cached and used
Improved performance By default, a procedure compiles the first time it is executed and creates an execution plan that is reused for subsequent executions. Reduced network usage between clients and servers The stored procedure performs intermediate processing on the database server, without transmitting unnecessary data across the network. Only the records that are actually required by the client application are transmitted. Improved security Easier maintenance database operations in the data tier, only the procedures must be updated for any changes in the underlying database. Reuse of code for repetitious database operation eliminates needless rewrites of the same code.
There are three types of relationships: One-to-one: Both tables can have only one record on either side of the relationship. Each primary key value relates to only one (or no) record in the related table.
They're like spousesyou may or may not be married, but if you are, both you and your spouse have only one spouse.
One-to-many: The primary key table contains only one record that relates to none, one, or many records in the related table.
This relationship is similar to the one between you and a parent. You have only one mother, but your mother may have several children.
Many-to-many: Each record in both tables can relate to any number of records (or no records) in the other table. For instance,
if you have several siblings, so do your siblings (have many siblings)
foreign key field must be of the same data type as the primary key.