In this lesson, we'll be looking at databases, which are computer mechanisms for storing and retrieving data. Test your knowledge following the lesson with a quiz.
Databases are basically containers for data. Because a public library stores books, we could also say that a library is a database of books. But strictly defined, databases are computer structures that save, organize, protect, and deliver data. A system that contains databases is called a database management system, or DBM. The typical diagram representation for a database is a cylinder.
Types of Databases
The simplest form of databases is a text database. When data is organized in a text file in rows and columns, it can be used to store, organize, protect, and retrieve data. Saving a list of names in a file, starting with first name and followed by last name, would be a simple database. Each row of the file represents a record. You can update records by changing specific names, you can remove rows by deleting lines, and you can add new rows by adding new lines.
Desktop database programs are another type of database that's more complex than a text database but intended for a single user. A Microsoft Excel spreadsheet or Microsoft Access are good examples of desktop database programs. These programs allow users to enter data, store it, protect it, and retrieve it when needed. The benefit of desktop database programs over text databases is the speed of changing data, and the ability to store large amounts of data while keeping performance of the system manageable.
Relational databases are the most common database systems. They include databases like SQL Server, Oracle Database, Sybase, Informix, and MySQL. The relational database management systems (RDMS) feature much better performance for managing data over desktop database programs. For example, they allow multiple users (even thousands!) to work with the data at the same time, creating advanced security for access to the data. RDBMS systems store data in columns and rows, which in turn make up tables. A table in RDBMS is like a spreadsheet. A set of tables makes up a schema. A number of schemas create a database. Many databases can be created on a single server.
The most innovative structures for storing data today are NoSQL and object-oriented databases. These do not follow the table/row/column approach of RDBMS. Instead, they build bookshelves of elements and allow access per bookshelf. So, instead of tracking individual words in books, NoSQL and object-oriented databases narrow down the data you are looking for by pointing you to the bookshelf, then a mechanical assistant works with the books to identify the exact word you are looking for. NoSQL specifically attempts to simplify bookshelves by storing data in a denormalized way; this means storing it in large chunks.
Normalization is a database business process to break up data into the smallest possible parts. Instead of storing first and last name in one bucket, or field, normalization requires that you store the first name separately from the last name. This is helpful if you want to sort the data by last name or by first name. RDBMS systems require that data is normalized.
Databases Categorized by Local Design
Depending on how databases are designed, they can be divided into operational databases and database warehouses. When databases store everyday data with fast updates, they're transactional or operational. These are most common. For example, inventory databases and product databases are all operational. Such databases require high speed of writing and high speed of reading. This makes them special and very sensitive to performance.
Over 83,000 lessons in all major subjects
Get access risk-free for 30 days,
just create an account.
A key feature of operational databases is support for transactions. When a user purchases a TV online, it's important to remove money from his credit card first, and only ship the TV if the part is successful. The transaction feature would lock the inventory table, lock the order table, and commit all changes only once the entire transaction was successful.
Database warehouses are intended to store many versions of the same data. Operational databases are often copied into warehouses on regular bases. This makes warehouses very large. An operational database may store a person's current last name. If the name changes, perhaps through marriage, the new last name will replace the old one.
A warehouse database provides an advantage by remembering the old last name and tracking when the change took place. The reason for warehouses is to track business performance trends and long-term changes. This allows business executives to see the trends and make strategic, long-term decisions. This area of computer science is called business intelligence.
Example: Text Database
Here is an example of a text database used commonly in today's Linux systems. It's saved on the computer in an /etc/passwd file.
This database has a specific list of columns, and each row in the file has the same type of information. We start with the user name, followed by '*' which replaces password, then the number of a user, then the number of a group, then the comment field, including the name of the user, followed by the home directory of the user, followed by the shell of the user. A shell is the main program the user executes. Even if the contents of each row don't mean much to you, the idea is that specific data is stored on each row.
Let's review. Databases are computer structures that save, organize, protect, and deliver data. A system that contains databases is called a database management system, or DBM.
We discussed four main types of databases: text databases, desktop database programs, relational database management systems (RDMS), and NoSQL and object-oriented databases. We also talked about two ways to categorize databases based on their logical design: operational databases and database warehouses.
Once you are finished, you should be able to:
Recall what a database is and what it is used for
Identify and describe different types of databases
Check your knowledge of the lesson on the examples and types of databases by determining whether the following statements are true or false. For this activity, print or copy this page on a piece of paper. Write TRUE if the statement is valid and FALSE if otherwise on the blank space provided. If the statement is FALSE, write down the word or phrase that makes it wrong.
_____ 1. Desktop database programs are the most innovative structures for storing data as of today.
_____ 2. Normalization is the process of organizing data in a database by breaking up data into its smallest possible parts.
_____ 3. A library is an organized container of data, generally stored and accessed electronically from a computer system.
_____ 4. Text databases are intended for a single user and provides the ability to store large amounts of data while keeping manageable system performance.
_____ 5. A number of schemas create a database and multiple databases can be created on a single server.
_____ 6. A database is typically represented by a cylindrical diagram.
_____ 7. An operational database provides support for transaction processing especially in managing, changing and storing data in real time.
_____ 8. Warehouse databases are designed for query and analysis of business performance and long-term changes.
_____ 9. NoSQL specifically attempts to simplify bookshelves by storing data in a normalized way.
_____ 10. Object-oriented databases are the most common database systems.
For False answers, the correct word or phrase is written in italic right next to the incorrect word for comparison.
1. FALSE, Desktop database programs, NoSQL and object-oriented databases
3. FALSE, library, Databases
4. FALSE, Text databases, Desktop database programs
Did you know… We have over 220 college
courses that prepare you to earn
credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the
first two years of college and save thousands off your degree. Anyone can earn
credit-by-exam regardless of age or education level.