Beruflich Dokumente
Kultur Dokumente
SQL COMMANDS
PRECEDENCE OF OPERATORS
● The precedence of operators are as follows:
❍ (+) and (-)—Unary operators (positive and negative number indicators)
and the PRIOR operators.
❍ (*) and (/)—Multiplication and division operators.
❍ Binary (=)—Arithmetic operators (such as addition “+” and subtraction
“-“) and the concatenation operator (||).
All comparison operators—This includes the NOT, AND, and OR logical
❍
operators.
● Parentheses always override precedence. Operators inside parentheses are
always evaluated first.
FUNCTIONS
● Functions are either scalar (single row) or aggregate (group) in nature. A
single-row function returns a single result row for each row of a queried table
or view, whereas an aggregate function returns a single value for a group of
rows.
● A single-value function can appear in a SELECT if the SELECT doesn’t contain
a GROUP BY clause. Single-value functions can also appear in WHERE,
START with, and CONNECT By clauses. Single-row functions can also be
nested.
LIMITS ON A VIEW
● A view can’t be updated if:
❍ It has a join.
❍ It uses SET operator.
❍ It contains a GROUP BY clause.
❍ It uses any group function.
❍ It uses a DISTINCT operator.
❍ It has flattened subqueries.
❍ It uses nested table columns.
❍ It uses CAST and MULTISET expressions.
DATABASE DESIGN
● The five-step system development cycle consists of:
❍ Strategy and analysis—Users are interviewed and requirements are
generated. Design documents are written. Entities, attributes, and
relationships are identified as well as relationships.
❍ Design—The actual system is designed in detail. Entity relationship
diagrams (ERDs), function decompositions, and data flow diagrams are
created. In object-oriented design, Universal Modeling Language (UML)
diagrams may be used instead of ERDs.
❍ Build and Document—The system is built mapping the ERD to tables and
columns (or objects) and relationships to primary key and foreign key
relationships (or REF values). The function decompositions and data
flows are used to create forms, reports, and other application modules.
❍ Transition—The system is moved from development into production.
During this period, user acceptance testing is performed and final
documentation is generated.
❍ Production—The system is placed into production, code is locked down,
and a firm change control process is implemented. This is the final
stage.
● Entities (or objects) can be either parent, or child, dependent, or independent.
An entity (or object) is a thing of importance.
● Relationships (or REFs) are named associations between things of significance
and have cardinality and optionality. Relationships can be one-to-one,
one-to-many, or even many-to-many, although most should be either required
or optional one-to-manys. A REF can be only a one-one relationship from child
back to parent record.
● Normalization is the process where repeating values (attributes) are removed
from an entity until all attributes in the entity relate only to the entity’s unique
identifier. The most common form of normalization is third normal form.
This CramNotes is provided by Coriolis. To read further details on this subject we suggest you to
consider purchasing the book below.