1 min read
Description SQL is a non-navigational language. What does that mean? With some databases, the calls to access the data instruct the system to navigate

By DIBYAJYOTI PANDA

The language of Relational Database Management Systems

Description

SQL is a non-navigational language. What does that mean? With some databases, the calls to access the data instruct the system to navigate the structure of the database objects. But with DB2, through SQL, the user tells DB2 what data to access, but not how to retrieve it. Rather, with SQL, the access path to the data is determined by the DB2 Optimizer. DB2 always strives to give the user the best possible performance when accessing the data, by minimizing the consumption of system resources (I/O’s and CPU cycles).

The SQL language is quite powerful, and is continually being enhanced with new functions. Oftentimes, there may be more than one way to write a query in order to obtain the results dictated by the logic requirements of the application program. So in that sense, the language is somewhat flexible.

However, as the S implies in the acronym, the language is structured. There is a format that needs to be followed, there are syntax rules, there are keywords that must be used, etc. We will go into some more detail about SQL later on during the course.

 

Rules

Rules for creating a table in DB2

Every table must be given a name. Also, each of the table’s columns must be assigned three attributes:

  • Name
  • Data type (and optionally a length)
  • Null characteristic

Some data types automatically imply a certain length, so for those data types, no length specification is necessary (or allowed). With other data types, the user needs to specify the desired length (and for decimal numbers, both a precision and scale).

 

Rate this post
3.5/5

Spread the words

Share on facebook
Share on google
Share on twitter
Share on linkedin