SQL an Overview
The SQL language and all popular Relational Database Management Systems based on it constitute the most universally implemented computer foundational technologies in today’s era.
Over the last decade or so, SQL’s popularity has ballooned globally to reach a cult status in the computer industry today. Consequently, it is now regarded as the standard computer database language. Over hundreds of database products, applications and related technologies today support SQL, spanning across-the-board on personal computers, mainframes and even handheld devices.
A database is the collection of all information sorted in a specific way on a computer. Information is stored in tables to make it easier to find what we are looking for. This way we can find all the information we need about individuals or all members of a group without any problems. After clicking what we want to find, a computer program goes to the database and searches for that particular information.
The official international SQL standard has not just been adopted across the globe but it also expanded twice. SQL is virtually the mainframe of data management in almost each enterprise software product, serving as the nucleus of database applications and services being offered by Oracle and Microsoft, two of the world’s largest software enterprises.
From its doubtful advent as a research project by IBM, SQL has emerged comprehensively as both, a quintessential computer foundation technology and formidable market-driving force.
Understanding Relational Databases
Structured Query Language (SQL) is the universal language tool to create and maintain a relational database and manage the data stored within a relational database. However, before we go on to discuss relational databases, let's explore the term database a little.
The term, itself, has been used for referring to anything from a collection of names, addresses and contact numbers to a complex system of data retrieval and storage that depends on user interfaces (UIs) and a network of client computer systems and servers. Millions of tress across the world have been chopped down to write volumes about SQL. Moreover, different architectures have been developed by different DBMS vendors, so not each database is designed in the similar fashion. Despite the scarcity of an absolute definition, the majority of sources agree that a database, for the least, is a structured organization of collected data that is defined by meta-data that explains that structure. You can consider meta-data as information about the data being stored with a database; and the way it is stored.
Over the years, a number of database models have been developed effectively to store and manage data. Several of the more common models include the following:
- Hierarchical. This model has a parent–child structure similar to an inverted tree; that is what forms a 'hierarchy'. Data is organized in nodes, the logical equivalent of tables in a relational database. A parent node can have many child nodes, but a child node can have only one parent node. Though the model has been extensively implemented, it is generally considered unsuitable for various applications since it has an inflexible structure and lacks support for complex relationships. Still, several implementations such as IMS by IBM have implemented features that work well around these limitations.
- Network. This model addresses most limitations of the hierarchical model. Data is organized in record types, the logical equivalent of tables in a relational database. Similar to the hierarchical model, the network model makes use of an inverted tree structure; however, record types are organized into a set structure that relates pairs of record types into owners and members. Any one record type can participate in any set with other record types in the database, which supports complex queries and relationships than possible in the hierarchical model. Still, the network model has its own limitations, too; the most critical of which is its complexity. To access the database, users must be well familiar with the structure and must keep careful track of where they are and how they got there. It’s also tough to modify the structure without affecting the applications that interact closely with the database.
- Relational. This model addresses most limitations of both the hierarchical as well as the network model. In a hierarchical or network database, the application depends on defined implementation of the database, which is then 'hard-coded' into the application. If you add a new attribute (data item) to a relational database, you must modify the application, even if it does not use the attribute. However, a relational database is independent of the application; you can make non-destructive modifications to the structure without impacting the application. Moreover, the structure of a relational database relies on the relation, or table, along with the competence of defining complex relationships between those relations. Each relation can be accessed directly, without the complex limitations of a hierarchical or owner/member model that needs navigation of a complex data structure.
Despite their preferred used in several enterprises, hierarchical and network databases are now generally regarded as legacy solutions. The relational model is the most widely implemented model in modern business environment, and it is the relational model that provides the foundation for SQL.