Sql Introducción

Páginas: 59 (14630 palabras) Publicado: 14 de noviembre de 2012
CONTENTS

1

INTRODUCTION

1.1

A Collection of Related Data : Databases and Database Management
Systems.

1.2
1.2.1
1.2.2

The Database as a Collection of Tables: Relational Databases and SQL.
Tables, Columns and Rows.
The Primary Key.

1.3

Communicating to the DBMS What You Want it to do: Introduction to the
SQL language.

1.4

A Research Project Conducted by IBM:The History of SQL.

1.5
1.5.1

SQL Commands Build Upon Themselves: Organization of This Book.
Notational Conventions.

2

A ROUGH GUIDE TO SQL.

2.1

Consider the Simple Address Book: A Basic Relational Database.

2.2

SQL Commands Fall into Different Categories: Subdivisions of SQL.

2.3

Enter SQL Statements at the Command Line: Using interpretive SQL.

2.4

Use theCREATE TABLE statement: Creating Database Tables.

2.5

Use the INSERT INTO Statement: Adding Data to Tables.

2.6

Use the SELECT Statement: Extracting data from tables.

2.7

Use the UPDATE and DELETE Statements: Modifying data.

2.8

Another Kind of Table, Called a Virtual Table: Views.

2.9

Prevent Access to Sensitive Information: Database security.

3

CREATING ANDMAINTAINING TABLES.

3.1

The ANSI Standard Makes Such a Distinction...: The DDL and the ANSI/ISO
standard.

3.2

Single and Multiple Database Architectures: The structure of SQL databases.

3.3

Creating a Database Table: The CREATE TABLE command.

3.4
3.4.1
3.4.2
3.4.3
3.4.4
3.4.5
3.4.6
3.4.7

Apply Restrictions to Groups of Columns: Column and table modifiers.
The NOT NULLmodifier.
The UNIQUE modifier.
The INDEX modifier.
The PRIMARY KEY modifier.
The FOREIGN KEY modifier.
The DEFAULT modifier.
The CHECK modifier

3.5

Indexes are Ordered for Extremely Fast Searches: Indexes.

3.6

Changing the Structure of a Table: The ALTER TABLE Command.

3.7

Remove Redundant Tables from the Database: The DROP TABLE
Command.

4

QUERYING SQL TABLES.

4.14.1.1

The most basic query: The Simple SELECT statement.
Calculated columns.

4.2
4.2.1
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6

Selecting rows for output: The WHERE clause.
Comparison Test Operators: =, =, .
Range Test Operator: BETWEEN.
Set Membership Test Operator: IN.
Pattern Matching Test Operator: LIKE.
NULL Value Test Operator: IS NULL.
Logical Operators: AND, OR and NOT.

4.3Ordering the output of a query: The ORDER BY clause.

4.4
4.4.1
4.4.2
4.4.3
4.4.4

Summary of data in tables: The ANSI aggregate functions.
The number of values or rows: The COUNT() function.
The total of values: The SUM() function.
The average value: The AVG() function.
The minimum and maximum values: The MIN() and MAX() functions.

4.4.5
4.4.6

Sub-totals of grouped values:The GROUP BY clause.
Eliminating groups of data: The HAVING clause.

4.5
4.5.1

Retrieving data from multiple tables: SQL joins.
Classification of joins.

4.6

Joining a table to itself: The self-join.

4.7

Nested SELECT statements: The subquery.

4.8

Linked SELECT statements: The correlated subquery.

4.9

Does the subquery retrieve values: The EXISTS operator.

4.10Two more subquery operators: The ANY and ALL operators.

4.11

Combining multiple queries: The UNION clause.

5

ADDING AND UPDATING DATA.

5.1

Adding Single Rows at a Time: INSERT command.

5.2

Adding Multiple Rows at a Time: The INSERT with SELECT command.

5.3

Modifying Data in Rows: The UPDATE command.

5.4

Removing Rows Form Tables: The DELETE command.

6DATA INTEGRITY

6.1

Keeping the Data Tidy: The Basics of Data Integrity.

6.2

Fields That Must Have Values: Non-NULL Columns.

6.3

Values Must be the Right Values: Data Validity.

6.4

Primary key values must be unique: Entity Integrity.

6.5

All Child Rows must have parents: Referential Integrity.

6.6

Integrity Requirements of the User: SQL Triggers.

7

VIEWS...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • introduccion a sql
  • Introducción sql
  • Introduccion a sql
  • Introduccion SQL
  • Introducción a SQL
  • Introducción al SQL
  • Introduccion sql
  • Introducción a SQL

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS