Heuristic in Query optimization

Heuristic optimization often includes making transformations to the query tree by moving operators up and down the tree so that the transformed tree is equivalent to the tree before the transformations. Before we discuss these heuristics, it is necessary to discuss the following rules governing the manipulation of relational algebraic expressions: 1. Joins and Products … Read more

Query Processing

In most database systems, queries are posed in a non-procedural language like SQL and as we have noted earlier such queries do not involve any reference to access paths or the order of evaluation of operations. The query processing of such queries by a DBMS usually involves the following four phases: 1. Parsing 2. Optimization … Read more

Data Manipulation Language in SQL (DML)

SQL language also includes syntax to update, insert, and delete records. These query and update commands together form the Data Manipulation Language (DML) part of SQL: • INSERT INTO – inserts new data into a database table • UPDATE – updates data in a database table • DELETE – deletes data from a database table … Read more

Data Definition Language (DDL) in SQL

The Data Definition Language (DDL) part of SQL permits database tables to be created or deleted. We can also define indexes (keys), specify links between tables, and impose constraints between database tables. The most important DDL statements in SQL are: • CREATE TABLE – creates a new database table • ALTER TABLE – alters (changes) … Read more

What is SQL?

Structured Query Language, commonly abbreviated to SQL and pronounced as “sequel”, is not a conventional computer programming language in the normal sense of the phrase. It allows users to access data in relational database management systems. SQL is about data and results, each SQL statement returns a result, whether that result be a query, an … Read more

Developing the Basic Schema

Once entities and relationships have been identified and defined, the first draft of the entity relationship diagram can be created. This post introduces the ER diagram by demonstrating how to diagram binary relationships. Recursive relationships are also shown. Binary Relationships Figure 1 shows examples of how to diagram one-to-one, one-to-many, and many-to- many relationships. Figure … Read more

The Entity-Relationship Model

The Entity-Relationship (ER) model was originally proposed by Peter in 1976 as a way to unify the network and relational database views. Simply stated the ER model is a conceptual data model that views the real world as entities and relationships. A basic component of the model is the Entity-Relationship diagram which is used to … Read more