Data and Databases
This chapter covers the concepts of data and databases. Businesses are becoming more and more "data-driven"; understanding how data is collected, stored, and managed is essential for anyone wanting to succeed in business. Pay special attention to the sections on data warehouses and data mining, as they provide examples of how companies use data strategically.
Structured Query Language
Once you have a database designed and loaded with data, how will you do something useful with it? The primary way to work with a relational database is to use Structured Query Language, SQL (pronounced "sequel," or simply stated as S-Q-L). Almost all applications that work with databases (such as database management systems, discussed below) make use of SQL as a way to analyze and manipulate relational data. As its name implies, SQL is a language that can be used to work with a relational database. From a simple request for data to a complex update operation, SQL is a mainstay of programmers and database administrators. To give you a taste of what SQL might look like, here are a couple of examples using our School database:
The following query will retrieve the major of student John Smith from the STUDENT table:
SELECT StudentMajor FROM STUDENT WHERE StudentName = 'John Smith';
The following query will list the total number of students in the STUDENT table:
SELECT COUNT(*) FROM STUDENT;
SQL can be embedded in many computer languages that are used to develop platform-independent web-based applications. An in-depth description of how SQL works is beyond the scope of this introductory text, but these examples should give you an idea of the power of using SQL to manipulate relational databases. Many DBMS, such as Microsoft Access, allow you to use QBE (Query-by-Example), a graphical query tool, to retrieve data though visualized commands. QBE generates SQL for you, and is easy to use. In comparison with SQL, QBE has limited functionalities and is unable to work without the DBMS environment.