Relational Database Components
- Thriving in a Data-Driven World
- Understanding the Relational Database
- The Relational Database Continues to Lead the Way
- Examples and Exercises
What You’ll Learn in This Hour:
▶ Understand information, data, and databases in organizations
▶ Examine common database environments
▶ Learn about the key components of the relational database
▶ Understand how SQL relates to the relational database
Welcome to the world of Structured Query Language (SQL) and the vast, growing database technologies of today’s global organizations. By reading this book, you have taken your first step in building the knowledge base needed to navigate today’s world of relational databases and data management. Before you dive into SQL, its role in relational databases, and the specifics of the language, you learn the basic concepts of the relational database in this hour so that you have a solid foundation to build upon for increased knowledge and sustainability.
The best approach to fully understanding any topic, including SQL, is to start with the basics and build from there. In this hour, you learn the basics of the relational database, get a little SQL history, and look at the key elements that comprise the relational database. From there, you will have a solid foundation to build upon.
SQL is a database language. It is the standard language used to communicate with any relational database, which is one of the most popular databases in use today (and, in fact, for decades). As you begin to understand the nuts and bolts of a relational database—and even database design, which later chapters cover—you can more easily grasp the concepts of SQL and more quickly apply SQL concepts and syntax to real-world situations in real databases. Hour 2, “Exploring the Components of the SQL Language,” focuses on the standard components of the SQL language to provide a preview. Then Hours 3, “Getting to Know Your Data,” and 4, “Setting Up Your Database,” get you involved with the database used in this book so that you deeply understand both the data and how that data is related in the database. When you have this information, you will understand SQL more easily, the knowledge you gain will stick, and you will have the basic foundation to start applying SQL.
Thriving in a Data-Driven World
Data is all around you: You can see it every day in your personal life and the organizations you work for. Data is on your phone, on your computer, in online stores, inside the walls of physical stores, and in complex databases in organizations all over the world. Truly, the world cannot survive without data.
Data, or information, has been around since the beginning of time and people have used that data to make decisions. The modern world has evolved to better understand how data can be used in everyday life and how to make organizations more competitive.
As the world becomes more competitive, it is your responsibility to learn how to use data effectively. You must be able to understand the information and data you’re working with and how to apply it to everyday situations. In today’s world, you have access to mountains of information, especially on the Internet. However, information must become usable data: If the data is not usable, it is useless. If it is inaccurate, it is useless. If it contains inconsistencies, it is useless. Databases and other technologies have helped people better take advantage of data, but this has also created a new problem: The volume of data is growing quickly and must be managed carefully. The relational database and SQL, in particular, facilitate easy data management, if done right.
Organizations, Data, and User Communities
You know by now that data is critical to the success of any organization or individual. Within an organization, many types of individuals depend on data—some of them every day:
▶ Organizational leaders
▶ Technical users
▶ Functional and end users
Figure 1.1 illustrates these individuals and also shows how data sits at the core of any organization. All sorts of users access data that is stored in a database of some sort. Applications are available to end users to manage data in a database and query the data in the database. This data is available to customers and other users to access the database in a limited manner, without jeopardizing the integrity of the data itself. Reports and other useful information can be generated from a database so that key personnel in an organization can use them to make high-level decisions; business intelligence is another term for this. Additionally, the administrators of the database are included in the general information technology environment, along with technical users that design, develop, and code the elements within a database and the applications surrounding the data. By looking at this simple diagram, you can easily see how important data is in an organization. SQL is the standard language that brings everything together so that all individuals, whether directly or indirectly, can interact with the database and get both accurate and available data to successfully perform their everyday duties.
Data and user communities
In simple terms, a database is a collection of data. You might like to think of a database as an organized mechanism that has the capability to store information that a user can retrieve in an effective and efficient manner.
As previously mentioned, people use databases every day without realizing it. For example, a contact list is a database of names, addresses, emails, telephone numbers, and other important information. The listings are alphabetized or indexed, which enables the user to easily look up a particular contact and quickly get in touch. Ultimately, this data is stored in a database somewhere on a computer.
Of course, databases must be maintained. As people move to different cities or states, entries have to be added or removed from the contact list. Likewise, entries need to be modified when people change names, addresses, telephone numbers, and so on. Figure 1.2 illustrates a simple database.
A typical database
Think of your mobile phone or any mobile device: It contains data and probably has many apps installed that access various databases. Additionally, your phone contains data in the form of contact lists and pictures.
Common Database Environments
In this section, you explore a couple of the most common database environments. A database environment contains all the key components to house a database and store data effectively, from the database itself, to the operating system, the network, and any applications that access the database via these key components. The following two major environments are briefly discussed in this hour:
▶ Client/server environments
▶ Web-based environments
In the past, the computer industry was predominately ruled by mainframe computers—large, powerful systems capable of high storage capacity and high data processing capabilities. Users communicated with the mainframe through dumb terminals—terminals that did not think on their own but relied solely on the mainframe’s CPU, storage, and memory. Each terminal had a data line attached to the mainframe. The mainframe environment definitely served its purpose and still does in many businesses, but a greater technology was soon introduced: the client/server model.
In the client/server system, the main computer, called the server, is accessible from a network—typically, a local area network (LAN) or a wide area network (WAN). The server is normally accessed by personal computers (PCs) or other servers instead of dumb terminals. Each PC, called a client, is granted access to the network, allowing communication between the client and the server. The main difference between client/server and mainframe environments is that the user’s PC in a client/server environment can think on its own and run its own processes using its own CPU and memory, but it is readily accessible to a server computer through a network. In most cases, a client/server system is much more flexible for today’s overall business needs.
Modern database systems reside on various types of computer systems with various operating systems. The most common types of operating systems are Windows-based systems, Linux, and command-line systems such as UNIX. Databases reside mainly in client/server and web environments.
Lack of training and experience is the main reason for failed implementations of database systems. Today’s businesses need personnel who can work within the client/server model and web-based systems (explained in the next section), can address the rising (and sometimes unreasonable) demands placed on modern organizations, and understand Internet technologies and network computing. Figure 1.3 illustrates the concept of client/server technology.
The client/server model
Business information systems have largely moved toward web integration. Databases have been accessible through the Internet for years, meaning that customers access an organization’s information through an Internet browser such as Chrome, Microsoft Edge, or Firefox. Customers (users of data) can order merchandise, check inventories, check the status of their orders, make administrative changes to accounts, transfer money from one account to another, and so on.
A customer simply invokes an Internet browser, goes to the organization’s website, logs in (if required by the organization), and uses an application built into the organization’s web page to access data. Most organizations first require users to register and then issue them a login and password.
Of course, many actions happen behind the scenes when a database is accessed through a web browser. For instance, the web application can execute SQL that accesses the organization’s database, returns data to the web server, and then returns that data to the customer’s Internet browser.
From the user’s standpoint, the basic structure of a web-based database system is similar to that of a client/server system (refer to Figure 1.3). Each user has a client machine that is connected to the Internet and contains a web browser. The network in Figure 1.3 (for a web-based database) just happens to be the Internet instead of a local network. For the most part, a client is still accessing a server for information; it doesn’t matter that the server might exist in another state or even another country. The main point of web-based database systems is to expand the potential customer base of a database system that knows no physical location bounds, thus increasing data availability and an organization’s customer base.