Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Build Your Own ASP.NET 2.0 Web Site Using CSharp And VB (2006) [eng]-1.pdf
Скачиваний:
143
Добавлен:
16.08.2013
Размер:
15.69 Mб
Скачать

8

Speaking SQL

 

So your database has been created, and you’ve defined all of the tables you’ll need, all of the columns for your tables—you’ve even defined the relationships between your tables. The question now is, “How will you get to that data?” Sure, you can open the database, look at the data contained in the tables, and manually insert and delete records, but that does little to help your web users to interact with that data. Mary in Accounting isn’t going to want to download and learn to use SQL Server Management Studio just so she can retrieve an employee’s mobile phone number—this functionality has to be provided by the Dorknozzle intranet web site, which, after all, is supposed to enable staff members to access data easily. In fact, the functionality can be created using web forms, web controls, a little code, and a useful database programming language known as Structured Query Language (or SQL).

SQL has its origins in a language developed by IBM in the 1970s called SEQUEL (which stood for Structured English QUEry Language), and is still often referred to as “sequel” or “ess-que-el.” It represents a very powerful way of interacting with current database technologies and the tables that constitute our databases. SQL has roughly 30 keywords and is the language of choice for simple and complex database operations alike. The queries you will construct with these keywords range from the very simple to extremely complex strings of subqueries and table joins.