Data Management
Given an overall architecture, you next need to choose a data management approach. Many applications have long-lived data, and require a database. For other applications, files, memory, or groupware can provide an adequate and economical solution.
-
Files. Applications can directly read from and write to sequential or random-access files. Files are simple to use and have no purchase cost. However, their complexity grows rapidly with the quantity and variety of data. Files can be difficult to maintain, extend, and coordinate for multiple users. Figure 2 shows the kinds of data suitable for files.
Figure 2 Data suitable for files. Files provide a low-tech solution to data management. Do not overlook them.
-
In-memory data structures. Computer memory can support persistent data when augmented with special power supplies or hardware. For example, both battery-powered memory and EPROMs retain data. In-memory storage provides high performance and sharing, and is simple to program. However, access to data can be inflexible, and this approach usually requires custom programming. Figure 3 shows the kinds of data suitable for in-memory data structures.
-
Groupware. Groupware is software that manages unstructured information for collaborating users. Groupware organizes data into documents that consist of items. Each item has an item name and one or more values. Lotus Notes is the most prominent groupware product.
-
Groupware is well-suited for managing large and complex documents. But because it is unstructured, it is prone to storing bad data. Groupware has limited support for data-management features such as multiuser access, recovery from errors, transactions, and flexible queries. Figure 4 shows the kinds of data suitable for groupware.
-
Databases. A database is a permanent, self-descriptive store of data that is contained in one or more files. A database management system (DBMS) is the software for managing a database. There are many reasons for using a database, such as promoting sharing between users and applications, protecting data from accidental hardware and software failures, and securing data. Figure 5 shows the kinds of data suitable for databases.
-
Hybrid approaches. Occasionally, it is helpful to mix data management approaches. For example, a graphics application might put detailed data in files, and store just the filenames in a database. A scientific application might put detailed, raw data in files, and store only summary data in a database.
Figure 3 Data suitable for in-memory data structures. Consider this approach for special situations.
Figure 4 Data suitable for groupware.
Figure 5 Data suitable for databases. Databases provide heavyweight data management. Use them for most business applications.