Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword or section
Like this
2Activity

Table Of Contents

About This Manual
Who Should Read This Manual
Organization
Conventions
1Relational Database Design
Stages of Design
Conceptual Design
Logical Design
Physical Design
2Creating a Database
Named Databases
Bound Databases
Creating Database Components
Naming Conventions
Unique Names
Valid Characters
Maximum Name Lengths
Table 2-1 Database Component Name Lengths
Case-Sensitivity
Creating a Data Dictionary
Table 2-2 Scalable SQL System Tables
Creating Tables
Aliases
Creating Columns
Creating Indexes
Index Segments
Table 2-3 Maximum Number of Index Segments per Data File
Index Attributes
3Inserting and Deleting Data
Inserting Values
Inserting Values from Other Tables
Transaction Processing
Deleting Data
Dropping Indexes
Dropping Columns
Dropping Tables
Dropping an Entire Database
4Modifying Data
Modifying Tables
Setting Column Attributes
Setting Default Values
Setting Valid Values
Setting Null Values
Specifying Edit Masks
Table 4-1 Mask Characters and Special Literals for String Data Types
Table 4-2 Mask Characters and Special Literals for NUMERIC Data Types
Table 4-3 Mask Characters and Special Literals for TIME and TIMESTAMP Data Types
Table 4-4 Mask Characters and Special Literals for DATE Data Type
Table 4-5 Mask Characters and Special Literals for Boolean Data Types
Permanent and Temporary Masks
String Masks
Number Masks
Table 4-6 Examples of Special Literals in Number Masks
Hexadecimal Masks
Date Masks
Time Masks
Timestamp Masks
Boolean Masks
Using UPDATE
5Retrieving Data
Views
Features of Views
Temporary and Stored Views
Read-Only Tables in Views
Mergeable Views
Selection Lists
Sorted and Grouped Rows
Joins
Joining Tables with Other Tables
Joining Views with Tables
Types of Joins
Subqueries
Subquery Limitations
Correlated Subqueries
Restriction Clauses
Figure 5-1Example Restriction Clause
Restriction Clause Operators
Boolean Operators
Table 5-1 Boolean Operators
Table 5-2 Relational Condition Operators
Table 5-3 Range Condition Operators
Restriction Clause Examples
Expressions
Expression Rules
Table 5-6 Integral Promotions Between Integral Operands
Table 5-7 Arithmetic Operators
Table 5-8 String Operators
Table 5-9 Conditional Computed Column Operators
Table 5-10Date Computations
Table 5-11Time Computations
Functions
Aggregate Functions
Table 5-12Aggregate Functions
Arguments to Aggregate Functions
Aggregate Function Rules
Scalar Functions
Table 5-13String Scalar Functions
Table 5-14Numeric Scalar Functions
RTRIM
Table 5-15Date Scalar Functions
Table 5-16Time Scalar Functions
Table 5-17CAST Function Data Type Conversions
Table 5-18Masks and the CAST Function
6Storing Logic
Stored Procedures
Declaring Stored Procedures
Invoking Stored Procedures
Deleting Stored Procedures
SQL Variable Statements
Declaring SQL Variables
Substitution Variables
Assignment Statement
SQL Cursor-Based Statements
SQL Cursor Declaration
LEAVE Statement
LOOP Statement
WHILE Statement
Retrieving Status Information
SQLSTATE System Variable
Exception and Completion Conditions
SQL Triggers
7Managing Data
Defining Relationships Among Tables
Referential Integrity Definitions
Keys
Primary Keys
Foreign Keys
Referential Constraints
Referential Integrity Rules
Figure 7-1Unsuccessful Insert Operation
Figure 7-2Unsuccessful Delete Operation
Figure 7-3Anomaly on Self-Referencing Tables
Anomaly on Delete-Connected Cycles
Figure 7-4Anomaly on Delete-Connected Cycle
Figure 7-5Prevention of a Delete-Connected Cycle
Figure 7-6Multiple Paths Anomaly
RI in the University Database
Creating the Course Table
Adding a Primary Key to Course
Creating the Student Table with Referential Constraints
Figure 7-7Foreign Key References
Foreign Key Reference
Administering Database Security
Understanding Database Rights
Table 7-1 Database Rights
Figure 7-8Relationships Among Rights
Table 7-2 Granting Rights
Table 7-3 Revoking Rights
Establishing Database Security
Enabling Security
Creating User Groups and Users
Creating User Groups
Creating Users
Granting Rights
Granting Rights to the PUBLIC Group
Granting Rights to User Groups
Granting Rights to Users
Dropping Users and User Groups
Revoking Rights
Disabling Security
Specifying Data File Owner Names
Retrieving Information about Database Security
Concurrency Controls
Starting and Ending Transactions
Using Savepoints to Nest Transactions
Special Considerations
Isolation Levels
Explicit Locks
Passive Control
Atomicity in Scalable SQL Databases
Transaction Control in Procedures
AUniversity Database Tables and Referential Integrity
Structure of the University Database
Assumptions
Entity Relationships
Figure A-1Entity Relationships
Referential Integrity in the University Database
Figure A-2RI Structure in the University Database
Table A-1 Tables and Columns Involved with RI
PERSON Table
ROOM Table
STUDENT Table
TUITION Table
User Comments
0 of .
Results for:
No results containing your search query
P. 1
Database Design

Database Design

Ratings: (0)|Views: 26|Likes:
Published by Abhishek Singh

More info:

Published by: Abhishek Singh on Oct 08, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

04/30/2013

pdf

text

original

You're Reading a Free Preview
Pages 6 to 112 are not shown in this preview.
You're Reading a Free Preview
Pages 118 to 167 are not shown in this preview.
You're Reading a Free Preview
Pages 173 to 179 are not shown in this preview.
You're Reading a Free Preview
Pages 185 to 247 are not shown in this preview.
You're Reading a Free Preview
Pages 253 to 272 are not shown in this preview.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->