Database Docu
Database Docu
common pool that provides data for one or more multiple uses.
A Database Management System (DBMS) - consists of software that organizes the storage of data.
Interface drivers - A user or application program initiates either schema modification or content
modification. These drivers are built on top of SQL. They provide methods to prepare statements,
SQL engine - This component interprets and executes the SQL query. It comprises three major
Transaction engine - Transactions are sequences of operations that read or write database elements,
Relational engine - Relational objects such as Table, Index, and Referential integrity constraints are
Storage engine - This component stores and retrieves data records. It also provides a mechanism to
store metadata and control information such as undo logs, redo logs, lock tables, etc.
A data warehouse stores data from current and previous years data extracted from the various operational
databases of an organization.
A relational database matches data using common characteristics found within the data set.
A real-time database is a processing system designed to handle workloads whose state may change
constantly.
1.5 NoSQL Databases
The next generation of database systems is known as NoSQL databases and document-oriented databases.
NoSQL databases are often very fast, do not require fixed table schemas.
Oracle
Sybase
dBase
Microsoft Access
etc.
1.7 MDAC
The Microsoft Data Access Components (MDAC) - is the framework that makes it possible to connect
OLE DB
Open Database Connectivity (ODBC) is a native interface that is accessed through a programming language
that can make calls into a native library. In MDAC this interface is defined as a DLL.
1.7.2 OLE DB
OLE allows MDAC applications access to different types of data stores in a uniform manner.
ActiveX Data Objects (ADO) is a high level programming interface to OLE DB.
2 Relational Databases
A relational database matches data using common characteristics found within the data set. The resulting
groups of data are organized and are much easier for people to understand.
2.1 Tables
The basic units in a database are tables and the relationship between them. Strictly, a relational database is a
In relational database design, a unique key or primary key is a candidate key to uniquely identify each row
in a table. A unique key or primary key comprises a single column or set of columns.
In the context of relational databases, a foreign key is a referential constraint between two tables.
2.4 Views
In database theory, a view consists of a stored query accessible as a virtual table composed of the result set
of a query.
Views can join and simplify multiple tables into a single virtual table.
Views can act as aggregated tables, where the database engine aggregates data (sum, average etc)
Views can hide the complexity of data; for example a view could appear as Sales2000 or Sales2001,
Views take very little space to store; the database contains only the definition of a view, not a copy
Views can limit the degree of exposure of a table or tables to the outer world.
2.5 Functions
In SQL databases, a user-defined function provides a mechanism for extending the functionality of the
A stored procedure is executable code that is associated with, and generally stored in, the database.
2.7 Triggers
A database trigger is procedural code that is automatically executed in response to certain events on a
The most common operation in SQL is the query, which is performed with the declarative SELECT
The FROM clause which indicates the table(s) from which data is to be retrieved. The FROM clause
can include optional JOIN subclauses to specify the rules for joining tables.
The WHERE clause includes a comparison predicate, which restricts the rows returned by the query.
The WHERE clause eliminates all rows from the result set for which the comparison predicate does
The GROUP BY clause is used to project rows having common values into a smaller set of rows.
GROUP BY is often used in conjunction with SQL aggregation functions or to eliminate duplicate
The HAVING clause includes a predicate used to filter rows resulting from the GROUP BY clause.
Because it acts on the results of the GROUP BY clause, aggregation functions can be used in the
The ORDER BY clause identifies which columns are used to sort the resulting data, and in which
direction they should be sorted (options are ascending or descending). Without an ORDER BY
The Data Manipulation Language (DML) is the subset of SQL used to add, update and delete data.
Acronym CRUD - refers to all of the major functions that need to be implemented in a relational database
application to consider it complete. Each letter in the acronym can be mapped to a standard SQL statement:
Operation SQL
Create INSERT
Update UPDATE
The Data Definition Language (DDL) manages table and index structure. The most basic items of DDL are
ALTER modifies the structure an existing object in various ways-for example, adding a column to an
existing table.
DATA TYPES - Each column in an SQL table declares the type(s) that column may contain. ANSI SQL
characters.
character set.
3.4.3 Numbers
DATE
TIME
TIMESTAMP
INTERVAL
4.1 ER Diagram
of data.
Microsoft Visio is a diagramming program for creating different kinds of diagrams. Visio have a template
4.3 ERwin
ERwin is a professional database modelling tool. A Community edition is also available for free. The
SQL Server Management Studio - is a GUI tool included with SQL Server for configuring, managing, and