Information Management Reviewer
Information Management Reviewer
Information Management Reviewer
Database activity–
Incremental commitment–review of
systems development project after each o Attribute–property or characteristic of an entity
development phase with rejustification or relationship type (often corresponds to a field
after each phase in a table)
Attributes
A Good Business Rule is: Attribute–property or characteristic of an entity or
relationship type
Declarative–what, not how Classifications of attributes:
Precise–clear, agreed-upon meaning o Required versus Optional Attributes
Atomic–one statement o Simple versus Composite Attribute
Consistent–internally and externally o Single-Valued versus Multivalued Attribute
Expressible–structured, natural language o Stored versus Derived Attributes
Distinct–non-redundant o Identifier Attributes
Business-oriented–understood by business people
Characteristics of Identifiers
E-R Model Constructs
Entities: Will not change in value
o Entity instance–person, place, object, event,
concept (often corresponds to a row in a table) Will not be null
o Entity Type–collection of entities (often
corresponds to a table) No intelligent identifiers (e.g., containing locations or
Relationships: people that might change)
o Relationship instance–link between entities
(corresponds to primary key-foreign key Degree of Relationships
equivalencies in related tables) Degree of a relationship is the number of entity types
o Relationship type–category of relationship…link that participate in it
between entity types o Unary Relationship
o Binary Relationship
o Ternary Relationship
Weak entity
Cardinality of Relationships
One-to-One o dependent on a strong entity (identifying
o Each entity in the relationship will have exactly owner)…cannot exist on its own
one related entity
One-to-Many o does not have a unique identifier (only a partial
o An entity on one side of the relationship can identifier)
have many related entities, but an entity on the
other side will have a maximum of one related o Partial identifier underlined with double-line
entity
Many-to-Many o Entity box has double line
o Entities on both sides of the relationship can
have many related entities on the other side
Associative Entities
Cardinality Constraints
An entity–has attributes
Cardinality Constraints - the number of
instances of one entity that can or must be A relationship–links entities together
associated with each instance of another
entity When should a relationship with attributes instead be an
associative entity?
Minimum Cardinality o All relationships for the associative entity should
be many
o If zero, then optional o The associative entity could have meaning
independent of the other entities
o one or more, then mandatory o The associative entity preferably has a unique
identifier, and should also have other attributes
Maximum Cardinality o Ternary relationships should be converted to
associative entities
o The maximum number
Supertypes and Subtypes
o exist independently of other types of entities Supertype: A generic entity type that has a
o has its own unique identifier relationship with one or more subtypes
SQL was initially named as SEQUEL and was developed by the Some of the most popular RDBMS that supports SQL are:
IBM Corporation Inc in
California in the year 1970 and was later called as SQL. Oracle
One of the first database products to run on a variety of - words with special meaning therefore these are considered
platforms reserved and cannot be used as identifiers.
One of the most popular open source database - a grammatically acceptable and valid combination of
indivisible parts such as keywords, identifiers,
Usually used with PHP operators, punctuation marks, or constants of the SQL
language.
MS SQL Server
Example: SELECT * FROM COLLEGE
Runs in Microsoft Windows OS
Clause
Supports numerous transactions and computer applications
stored - is a fragment of an SQL statement that is usually introduced
by a keyword.
SQL CONCEPTS
Example: ORDER BY FName
Comment
Expression
- a word, clause, or statement added by the programmer to
remind him of what a particular part of code - refers to any legal combination of keywords and numeric
does. symbols that evaluates to a single data value.
Identifiers Functions
- names given to the database objects such as tables, columns, - are section of codes that take zero, one, or more input values,
views, and databases. perform a specific assignment and return a
scalar or tabular set of values.
Example: COLLEGE which is a name given to a table.
Example: SUM(), UPPER()
Keywords
Operators
- work with one or more simple expression to form a more image – used to store images in binary format
complex expression.
bit – an integer data type which can store only 0 or 1 and can
Example: AND, +, > consume only a single bit of
storage space.
Semicolon
xml – used to store xml data.
Used to end SQL statements
CATEGORIES OF SQL STATEMENTS
In some variants of the SQL semicolon is optional
Data Definition Language (DDL) Statements
SQL DATA TYPES
These are statements that define, modify, and destroy the
INT – holds whole numbers structure of database and
the tables within the database.
DECIMAL(size,d) or NUMERIC(size,d) – holds numbers
containing decimal point. Statements included under the DDL:
FLOAT – holds numbers containing decimal point and uses 8 CREATE DATABASE – creates a new database
bytes for storage with up to
15 digits precision. DROP DATABASE – removes an existing database
CHAR(size) – holds fixed-length character string where the ALTER TABLE – modifies the structure of a database table
exact length of the data to be
stored is already determined. DROP TABLE – destroys a database table
SMALL DATETIME – holds time values in HH:MI:SS.[nnnnnnnnn] Used to control the contents of the tables and do not have an
format. effect on the structure
of the database.
DATETIME – holds date and time values in YYYY-MM-DD
HH:MI:SS.[nnn] format. Statements included under the DML:
VARBINARY(max) – used to store images in binary format and INSERT INTO – inserts new data into the database table
holds up to 2 gigabytes
of binary data. SELECT – retrieves data from the database tables
UPDATE – modifies the data stored in the database tables column_name1 datatype,
These are statements used to control a database including [table constraints, if any]
administering privileges by
authorizing certain users to view, change, or delete database )
objects and/or the data
within the database. Example:
GRANT – assigns privileges to users and roles ColCode varchar(10) primary key,
DDL SYNTAX )
Syntax: ( column_name1…column_namen )
VALUES ( first_value…last_value )
DML SYNTAX
UPDATE Statement
SYNTAX:
UPDATE table_name
SET Column_name=newvalue
WHERE condition
DELETE Statement
SYNTAX:
WHERE condition