Академический Документы
Профессиональный Документы
Культура Документы
Chapter 4
Produces results by
Partitioning the objects (table, view, etc.) of one application from other
applications.
Each application may maintain different entities with the same name.
SQL Statements
CREATE Statement
ECOMM Schema
10
CBLOB is used to store very large character data that might normally
be placed in a file. e.g. several megabytes and even larger.
11
12
13
14
15
16
Index
17
Index
18
The exported key i.e. the key that is used as a foreign key in / by
other tables.
Also serves to suggest the tables physical row ordering.
19
20
Foreign Keys
21
22
23
ON DELETE
Foreign Key Constraints
24
ON UPDATE
Foreign Key Constraints
ON UPDATE RESTRICT
ON UPDATE CASCADE
25
COMPANY Schema
Example Schema from Text
26
SELECT Statement
27
SELECT-FROM-WHERE Clauses
Select the rows in the given tables where the attribute values
match the given conditions.
28
SELECT *
FROM EMPLOYEE
WHERE FNAME = 'Brad' AND LNAME = 'Knight';
29
30
31
32
Recursive Query
33
Default Select
34
35
36
Example Union
37
String Matching
38
String Matching
39
String Matching
40
BETWEEN operator
41
Select employees whose 10% raise places their salary over 100K.
42
43
INSERT Statement
44
Note how the nested SELECT provides the values for the
INSERT statement.
The selected columns (lname, pname, hours) must match the
data types and sizes of the inserted works_on_info table.
45
DELETE Statement
46
Removes all rows from EMPLOYEE but not the table itself.
47
UPDATE Statement
48
UPDATE Statement
UPDATE EMPLOYEE
SET salary = salary * 1.1
WHERE dno = 5;
49