Professional Documents
Culture Documents
Course Title:-
DBMS
Chapter 6:-
Introduction to SQL
Course Teacher:-
Eng. Said Mohamud Adam(S-Daacad)
Chapter 6 Lectureras Prentice Hall
© 2013 Pearson Education, Inc. Publishing
1
OBJECTIVES
Define terms
Interpret history and role of SQL
Define a database using SQL data definition
language
Write single table queries using SQL
Establish referential integrity using SQL
Discuss SQL:1999 and SQL:2008 standards
Overall table
definitions
Primary keys
can never have
NULL values
Identifying primary key
Chapter 6 © 2013 Pearson Education, Inc. Publishing as Prentice Hall
17
Non-nullable specifications
Primary key
Default value
Domain constraint
Primary key of
parent table
Relational
integrity is
enforced via
the primary-
key to foreign-
key match
Table Actions:
SELECT CUST.CUSTOMERNAME
CUST AS
NAME,
NAME CUST.CUSTOMERADDRESS
FROM CUSTOMER_V CUST
WHERE NAME = ‘Home Furnishings’;
By default,
processing order
of Boolean
operators is NOT,
then AND, then
OR
47