Skip to content

Security

Encryption: FIPS (Federal Information Processing Standard) or Common Criteria, two internationally recognized security standards.

Managing the RDBMS

A single logical operation on the data is called a transaction.

 

ACID:

 

 

Backing up a Database:

  1. Physical backup
    1. Cold backup after shutting down the database. Shutting down period may be long.
    2. Hot backup while database is online. May not allow transaction log to play against a backup taken this way.
  2. Logical backup

 

Data dictionary is a set of tables that provides information about the database details, basically meta-data information.

Backup creates a second copy. Data recovery restores a copy of data from back up.

 

Transaction log (also database log or binary log) is a history of actions executed by a database management system to guarantee ACID properties over crashes or hardware failures.

Data Normalization

Physical and Relational Data Model

 

Primary key is a unique identifier for a table.

  1. Should be unique.
  2. Should not hold null (undefined).
  3. Should not change value for its lifetime.

If it has more than one attribute it is called composite key.

 

Foreign key is a primary key in a different table. Diagrammatically, a foreign key is depicted as a line with an arrow at one end.

 

Fields are the columns in databases. They can also be a piece of specific information from a record.

 

A table is a row and column arrangement of data.

 

Referential Integrity says that

  1. We may not add a record to the table that contains the foreign key unless there is a corresponding record in the linked table.
  2. Cascading update has to be implemented meaning when a record in the linked table changes, all foreign keys in the Employees table must be modified using a cascading update.
  3. Cascading delete has to be implemented meaning when a record in the linked table changes, all records in the linking table must be deleted using a cascading delete.

MS SQL

Logical Data Model

Programming

A database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database


Cursors provide a mechanism by which a database client iterates over the records in a database.

Scrollable and NonScrollable (Forward one step only at a time) cursors are there.


A stored procedure is a subroutine available to applications accessing a relational database system


Two Phase Commit is the process by which a relational database ensures that distributed transactions are performed in an orderly manner. In this system, transactions may be terminated by either committing them or rolling them back.

Data Model

Feature Conceptual Logical Physical
Entity Names

X

X

  
Entity Relationships

X

X

  
Attributes

  

X

  
Primary Keys   

X

X

Foreign Keys

  

X

X

Table Names      

X

Column Names   

  

X

Column Data Types      

X

View

View is nothing but parsed SQL statement which fetches record at the time of execution.

There are mainly two types of views:

  1. Simple View.
  2. Complex View.

Also

  1. Updatable Views.
  2. Read only Views.

 

Finally, we have Materialized Views.

View is used for the purposes as stated below:

  1. Security.
  2. Faster response.
  3. Solve complex query.

 

Syntax is:

CREATE or REPLACE view ([olumn1] [column2]...)
AS
SELECT column1 column2...
FROM tablename
[WHERE condition]
[WITH read only] [WITH check option]

RDBMS

 

Advantages:

  1. Redundancy reduced.
  2. More adaptable for change.