SQL-Server简介外文翻译.doc_第1页
SQL-Server简介外文翻译.doc_第2页
SQL-Server简介外文翻译.doc_第3页
SQL-Server简介外文翻译.doc_第4页
SQL-Server简介外文翻译.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Introduction to SQL ServerBy SamuelRelational databases have been around for 30 years, but they were not the original kind ofdatabase, nor are they the newest kind of database. XML and object-oriented data structures haveevolved in recent years. But relational databases are still by far the most popular kind of database available and will be for some time to come.SQL is the abbreviation of Structured Query Language and it is for relational databases, as the title indicates this is only for fresher who has just started the carrier or who is waiting to open up the carrier in the application programming side. But that does not mean this article is a tutorial for a fresher who does not know anything about SQL.This article is meant for who already have a little knowledge in SQL and want toimprove it.What Does SQL Do?First, SQL is the premier tool for viewing information from a relational database. It doesnt just give you a data dump. SQL gives you sophisticated tools to summarize, consolidate, and calculate from the data. Using table relationships, data can be combined from multiple tables in a number of ways. With a properly designed database, SQL can answer practically any question about the data.Second, SQL provides commands to manipulate the data in a relational database. Records can be updated and added to or deleted from a table. Here is SQL as a database language really shines. Procedural programming languages, such as BASIC, might require several lines of code to update a record in a database table. In addition, procedural programming languages would have to use some sort of looping structure to repeat this process on every record. SQL operates on an entire set of records all at the same time. SQL is like haiku for programmers; often a dozen words or fewer can delete or change thousands of records.Finally, SQL is a complete data definition language (DDL). The database itself can be created along with all tables, fields, primary keys, and relationships. Add to that the record insert commands, and you can have a complete database and all its data expressed in programming code. This greatly enhances a database programmers ability to work remotely or to port data enhancements among various installations.The prerequisite for learning SQL is knowledge in Discrete Mathematics (Set Theory,Relations and Functions). Although it is not necessary to learn all the theorems and proof for the theorems in the Discrete Mathematics, you should have learned the basic concepts of the Sets, Relations and Functions. This will help you to learn SQL queries and fundamentals easily. If you want to explore a RDBMS more deeply you should learn Graph Theory too.Although I tried to avoid SQL Server specific topics in this article, I am sure that some topics are pure to SQL server such as SQL Enterprise manager.Representation of Data by DBMSDBMS should represent the data stored by them in some form and it is most common to represent them as Column, Row, Tables and Databases. As you know SQL you know what are columns, rows, tables and database.Primary KeyA column or set of columns used to uniquely identify the records in a table. Primary Keys dont allow NULL values. You can relate a table with other table if you have defined primary on it. (So defining UNIQUE and NOT NULL constraint is not equivalent to primary key). SQL server will create a Clustered index while you create a primary key.Primary keys should be carefully defined since based on it other relations are defined. Poorly designed primary keys will affect insert, update and delete operations. Primary keys are different from which are used for paperwork.Foreign KeyThe primary key of one of the tables is almost always involved in the relationship. The field in the other table on the other end of that relationship is called the foreign key. The termsimply refers to the fact that this field is key to relating to a foreign (or other) table. In the Lyric Music database there is a relationship between artists and titles. The ArtistID field is the primary key in the Artists table. Therefore, the ArtistID field in the Titles table is a foreign key. It relates the Titles table to the primary key in the Artists table.Most table relationships can be described as one-to-many. In a one-to-many relationship, a single record in the first table can be related to many records in the second table. However, each record in the second table relates to only one record in the first table. In addition to one-to-many relationship, tables can have one-to-one relationships. But these are much less common.DDL (Data Definition Language)What is data type? Classification of data into similar groups. Names, Money,Date, Time, etc are examples for data type.What is the use of classification or data type? It increases the performance, reduces the space needed to store the data.DML (Data Manipulation Language)Data Manipulation Languages contains command used to query, change, and add data from/to the database. This includes the following commands - SELECT, INSERT, DELETE. All these commands are deals with set of data. So I want to refresh the Set theory concepts before going further.TransactionsA transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties, called the ACID (Atomicity, Consistency, Isolation, and Durability) properties, to qualify as a transaction.DTS (Data Transformation Services)Data Transformation Services are used to transfer and transform data from one datasource to another datasoure in the same server or another server.Some applications of DTS1) Copying data from one database to another database2) Copying data structure from one database to another database3) Migrating data from other datasources such as Flat File, Excel, Access, Oracle to SQL Server.4) Migrating data from SQL server to other datasources.Since the DTS topic is huge you cannot get to know what it is until you do actual task that is related to DTS. So try the following things and you will get to know something about DTS. Create an Excel file with the following columns EmployeeName, Address, DateOfJoin, PhoneNumber, MaritialStatus, and Department. Fill this excel sheet with some meaningful information and then try to transfer the contents from Excel to SQL using DTS Import/Export Wizard.You can also create DTS packages which can be scheduled to run at future. DTS package programming allows mapping source fields to different destination fields and also provides error control.SQL ProfilerSQL Profiler is a handy tool used to analyze what is happening inside and outside of a SQL Server. Simply it is a tool which extracts the log information from SQL server.These logs will help you debug applications, optimize queries, redesign database structure.Running SQL Profiler is very easy, Click SQL profiler from the SQL Server group menu. Then select New Trace from the file menu. It will open the connection dialog box. Type your server name, user name and password. Now you have to set options for your profile. The options include what events you want to trace, what columns you want in the output, filters if any.SQL server 简介塞缪尔著关系数据库已经存在了30年,但他们不是原种的数据库,他们也不是最新的数据库。 XML和面向对象的数据结构在近几年已经发展。但是,关系数据库仍然是迄今为止最流行的数据库,并将于今后一段时间继续被人们所使用。SQL是结构化查询语言的缩写,并且用于关系数据库。如题目,这篇文章只是在应用程序编程方面刚开始开发或者准备开发项目的载体。但是,这并不意味着这篇文章能给初学者关于SQL的一个清楚的介绍。这篇文章是给那些关于SQL有一些了解,并且想提高水平的读者读的。SQL是干什么的?首先,SQL是用于查看关系数据库中的信息的首选工具。它不仅给你转储数据,而且是对数据总结、巩固和计算的先进工具。使用表关系,数据可以从来自多个表中的许多方面被合并。SQL可以回答一个完善的数据库几乎所有有关数据的问题。其次,SQL提供了在关系数据库中数据的命令操纵功能,记录可以被更新并添加到一个表中或从一个表中删除,这是作为数据库语言SQL真正的闪光点。程序的编程语言,如BASIC,可能需要几行代码来更新数据库表的记录。此外,程序的编程语言就必须使用一些循环结构排序在每个记录中重复这一过程。SQL能在同一时间操作所有记录。 SQL对于程序员像是俳句,经常用很多语句或更少就可以删除或更改数千的记录。最后,SQL是一个完整的数据定义语言(DDL)。该数据库本身可以创建和所有表,字段,主键的关系。通过向该记录插入指令添加数据,你可以有一个完整的数据库和所有编程代码表示的数据。这极大地增强了数据库编程的工作能力或者各端口远程数据的改进。学习SQL的先决条件是离散数学(集理论知识,关系和函数)。虽然没有必要学习所有的定理和离散数学定理证明,但是应该了解基本概念,关系和职能。这将帮助您学习SQL查询和基本内容。如果你想更深入探讨关系数据库管理系统,也应该学习图论。虽然我尽力在这篇文章中避免探讨SQL Server的特定主题,但是我确保这篇文章涉及到关于SQL Server,例如SQL企业管理器的内容。通过数据库管理系统表示数据数据库管理系统应该代表他们在某种形式下存储的数据,最常见的代表是列,行,表格和数据库。如你所知SQL让您知道什么是列,行,表和数据库。主键主键是在表中用于唯一标识一列或者多列数据的记录,主键不能为空值。如果你在一个表中定义主键,就可以和另外一个表相关联(所以,定义唯一和不能为空值不等于是主键)。当您创建一个主键时,SQL服务器将创建一个聚集索引。在其他关系已经定义的基础上再定义主键的时候应该注意。主键设计不当会影响插入,更新和删除操作。主键和用于文书工作的事务不同。外键几乎在所有的关系中都能涉及到主键,两个有关系的表,一个表的主键是另一个表的外键。这个词指的是一个表和其他表连接的关键区域。在抒情音乐的数据库中有一个艺术家和标题之间的关系。艺术家的存储位置是艺术家表的主键,因此,艺术家的存储位置在标题表中是外键。它涉及标题表到艺术家表的主键。大多数表关系可以

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论