Chapter Chapter 66 Introduction to SQLIntroduction to SQL
Chapter 6
Introduction to SQL
1
Objectives
?
?
?
?
?
Define terms
Define a database using SQL data definition
language
Write single table queries using SQL
Establish referential integrity using SQL
Discuss SQL:1999
Q
and SQL:200n
Q
standards
2
Figure 6-1
A simplified schematic of a typical SQL environment, as
d
described
ib d b
by th
the SQL
SQL: 200
200n standard
t d d
3
SQL Overview
?
Structured Query Language
?
The standard for relational database management
systems
t
(RDBMS)
?
RDBMS: A database management system that
manages data as a collection of tables in which all
relationships
p are represented
p
by
y common values in
related tables
4
SQL
Q Environment
?
Data Definition Language (DDL)
?
?
Data Manipulation Language (DML)
?
?
Commands that define a database, including creating, altering,
and dropping tables and establishing constraints
Commands that maintain and query a database
Data Control Language (DCL)
?
Commands that control a database, including administering
privileges and committing data
5
SQL Data Types
6
DDL: Table Creation
Figure 6-5
Fi
6 5 General
G
l syntax ffor CREATE
TABLE statement used in data
definition language
g g
Steps in table creation:
1 Identify data types for
1.
attributes
2. Identify columns that can
and
d cannott b
be nullll
3. Identify columns that
must be unique
(candidate keys)
4. Identify primary key¨C
foreign key mates
5. Determine default values
6. Identifyy constraints on
columns (domain
specifications)
7 Create the table and
7.
associated indexes
7
The following slides create tables for
thi enterprise
this
t
i data
d t model
d l
((from Chapter
p
1,, Figure
g
1-3))
8
Figure 6-6 SQL database definition commands for Pine Valley Furniture
Company (Oracle 11g)
Overall table
definitions
9
1. Defining attributes and their data types
10
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- introduction to sql
- sql commands intellipaat
- writing basic sql statements
- sqlbase sql language reference
- sql list all tables in schema
- chapter chapter 66 introduction to sqlintroduction to sql
- banner sql 101 university system of georgia
- a data definition tables
- how to use proc sql select into for list processing
- sql server standards illinois state board of education
Related searches
- how to cite introduction to sociology 2e
- introduction to psychology chapter 1
- introduction to psychology chapter 1 quiz
- sql code to export to csv
- introduction to psychology chapter 2 quizlet
- best chapter books to read to kids
- introduction to psychology chapter 4
- introduction to psychology chapter 2
- chapter 8 an introduction to metabolism key
- oracle database 11g to sql 19c
- chapter 1 introduction to life span
- pandas to sql example