Beruflich Dokumente
Kultur Dokumente
:
A database is an application that can store and retrieve data very rapidly. The relational bit refers to how the data is stored in the database and how it is organized. When we talk about database, we mean a relational database, in fact an RDBMS - Relational Database Management System. In a relational database, all data is stored in tables. These have the same structure repeated in each row (like a spreadsheet) and it is the relations between the tables that make it a "relational" table.
Commercial Databases
Oracle IBM DB 2 Microsoft SQL Server Ingres. The first commercial RDBMS.
A relational database is a collection of data items organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables. The relational database was invented by E. F. Codd at IBM in 1970. The standard user and application program interface to a relational database is the structured query language (SQL). SQL statements are used both for interactive queries for information from a relational database and for gathering data for reports. In addition to being relatively easy to create and access, a relational database has the important advantage of being easy to extend. After the original database creation, a new data category can be added without requiring that all existing applications be modified. A relational database is a set of tables containing data fitted into predefined categories. Each table (which is sometimes called a relation) contains one or more data categories in columns. Each row contains a unique instance of data for the categories defined by the columns. For example, a typical business order entry database would include a table that described a customer with columns for name, address, phone number, and so forth. Another table would describe an order: product, customer, date, sales price, and so forth. A user of the database could obtain a view of the database that fitted the user's needs. For example, a branch office manager might like a view or report on all customers that had bought products after a certain date. A financial services manager in the same company could, from the same tables, obtain a report on accounts that needed to be paid.
When creating a relational database, you can define the domain of possible values in a data column and further constraints that may apply to that data value. For example, a domain of possible customers could allow up to ten possible customer names but be constrained in one table to allowing only three of these customer names to be specifiable. The definition of a relational database results in a table of metadata or formal descriptions of the tables, columns, domains, and constraints.
Data entry, updates and deletions will be efficient. Data retrieval, summarization and reporting will also be efficient. Since the database follows a well-formulated model, it behaves predictably. Since much of the information is stored in the database rather than in the application, the database is somewhat self-documenting. Changes to the database schema are easy to make.
The goal of this article is to explain the basic principles behind relational database design and demonstrate how to apply these principles when designing a database using Microsoft Access. This article is by no means comprehensive and certainly not definitive. Many books have been written on database design theory; in fact, many careers have been devoted to its study. Instead, this article is meant as an informal introduction to database design theory for the database developer. Note: While the examples in this article are centered around Microsoft Access databases, the discussion also applies to database development using the Microsoft Visual Basic programming system, the Microsoft FoxPro database management system, and the Microsoft SQL Server client-server database management system.
Object databases store objects rather than data such as integers, strings or real numbers. Objects are used in object oriented languages such as Smalltalk, C++, Java, and others. Objects basically consist of the following:
Attributes - Attributes are data which defines the characteristics of an object. This data may be simple such as integers, strings, and real numbers or it may be a reference to a complex object. Methods - Methods define the behavior of an object and are what was formally called procedures or functions.
Therefore objects contain both executable code and data. There are other characteristics of objects such as whether methods or data can be accessed from outside the object. We don't consider this here, to keep the definition simple and to apply it to what an object database is. One other term worth mentioning is classes. Classes are used in object oriented programming to define the data and methods the object will contain. The class is like a template to the object. The class does not itself contain data or methods but defines the data and methods contained in the object. The class is used to create (instantiate) the object. Classes may be used in object databases to recreate parts of the object that may not actually be stored in the database. Methods may not be stored in the database and may be recreated by using a class.
Object Persistence
With traditional databases, data manipulated by the application is transient and data in the database is persisted (Stored on a permanent storage device). In object databases, the application can manipulate both transient and persisted data.
This includes a many to many object relationship. Object databases should not be used when there would be few join tables and there are large volumes of simple transactional data. Object databases work well with:
CAS Applications (CASE-computer aided software engineering, CAD-computer aided design, CAM-computer aided manufacture) Multimedia Applications Object projects that change over time. Commerce
Objects don't require assembly and disassembly saving coding time and execution time to assemble or disassemble objects. Reduced paging Easier navigation Better concurrency control - A hierarchy of objects may be locked. Data model is based on the real world. Works well for distributed architectures. Less code required when applications are object oriented.
Lower efficiency when data is simple and relationships are simple. Relational tables are simpler. Late binding may slow access speed. More user tools exist for RDBMS. Standards for RDBMS are more stable. Support for RDBMS is more certain and change is less likely to be required.
ODBMS Standards
Object Data Management Group Object Database Standard ODM6.2.0 Object Query Language OQL support of SQL92
Each object has a unique ID and is defined as a subclass of a base class, using inheritance to determine attributes. Virtual memory mapping is used for object storage and management.
Data transfers are either done on a per object basis or on a per page (normally 4K) basis.
Technical issues
Several technical issues have led to OO databases' limited strength in the database marketplace. Object-relational databases. RDBMS vendors began developing and marketing OR databases in part in response to the perceived threat from OO databases. OR databases work via an object layer that sits atop a conventional tabular relational engine. Vendors integrate OO features into the databases via software modules (such as Informix's DataBlades or Oracle's Cartridges), each designed to handle video, audio, text, or other types of media. So, in addition to handling the numerical data generally used in relational databases, OR databases can handle multimedia data types. Performance. OO databases can store data sets in their entirety and thus typically run faster than relational databases, which must break data sets into parts for storage within tables and then reassemble them in response to queries. In addition, said Sun's Cattell, OO databases can automatically cache data in the client application's memory, thereby eliminating extra calls to the DBMS's back end and speeding up responses. And OO databases use optimizers that determine the best way to use a database's indices and physical layout to satisfy a query. However, relational databases have reduced OO databases' performance advantage with improved optimizers. The optimizers improve ways of finding information within relational databases' tables and indices. Standardization. Relational databases use the long-established SQL (Structured Query Language) standard, which has been adopted by the International Organization for Standardization (ISO) and the American National Standards Institute (ANSI). SQL, used for querying and updating a relational database, serves as a user interface and application program interface to an RDBMS. The Object Database Management Group has developed ODMG standards for object-database and object-relational-mapping products since 1993. However, the Object Database Management Group hasn't promoted ODMG widely within the ODBMS community and needs more vendors on board
to make the standard an important factor in the industry, said Philip Russom, director of data warehousing and business-intelligence services for the Hurwitz Group consultancy. For example, he said, the group created an OQL (Object Query Language) standard, but very few database vendors implemented it. "A much bigger problem is that the vendors behind ODMG represent zero billion [dollars] in revenue while the vendors behind SQL . . . represent several billion in revenue," said Informix's Stonebraker. "Hence, it is not a standard with critical mass in the marketplace."
Business issues
"OO systems have not focused on bread-and-butter traditional business-data processing applications where high performance, reliability, and scalability are crucial," Stonebraker said. "This is a large market where relational systems excel and have enjoyed wide adoption." "Companies are justifiably loath to scrap such systems for a different technology, unless it offers a compelling business advantage, which has rarely been demonstrated by OO systems," he said. "As such, relational systems and their OR descendants continue to be the market leaders." Meanwhile, because relational databases have a much bigger installed base, RDBMS vendors have more money and marketing clout than ODBMS vendors. And with their bigger installed base, more tools are available for relational databases, for such functions as administration and Web development. Hurtwitz's Russom thinks OO databases will continue to be used mostly in niche markets and that their adoption has peaked. "With this impending downturn in the ODBMS life cycle, many ODBMS vendors are scrambling to develop new products or repositioning existing offerings to create new revenue sources as revenue from ODBMSs' slow down." "Relational vendors realized that objects are important and added them, producing OR systems," Stonebraker said. "However, the failure of OO vendors to realize the importance of SQL and the needs of business-data processing has hurt them immensely."
SIDEBAR
Relational databases are good for managing large amounts of structured, alphanumerical data. For example, companies use them to maintain records of transactions or personnel files. However, relational databases are rigid because their only data structure is tables. And they work only with limited, simple data types, such as integers, and thus have had trouble handling complex and user-defined data types, including multimedia.
OO Database Orientation
An OO database-management system (ODBMS) supports the modeling and creation of data as objects. Users can support new media types with OO databases simply by creating new objects. With OO databases, the application and the database use exactly the same object model. This isn't the case with relational databases, with which users must utilize an object model for the application and a relational-data model for the database. Users thus must develop mapping procedures between the object and relational models. RDBMS programmers sometimes spend more than 25 percent of their coding time mapping program objects to the database, said Carl Olofson, program director of information and data management software for IDC, a market research firm. "The result for ODMBSs is less code to develop, reduced development time, and reduced maintenance costs," said Doug Barry, executive director of Barry & Associates consultants and also chair and executive director of the Object Data Management Group (ODMG), an OO database-standards organization. Meanwhile, OO databases are well suited for use with applications that must manage complex relationships among data objects. "If you're modeling a Boeing 747 with an ODBMS, the relationships between aircraft parts are directly managed [by the database]," said Akmal Chaudhri, a database expert and visiting scholar at The City University in London. With a relational database, he said, you have to decompose the aircraft into tables and then join the tables when you need to reconstruct the aircraft. However, OO databases don't scale up to high transaction volumes and user counts as well as relational databases, said Philip Russom, director of data warehousing and business-intelligence services for the Hurwitz Group consultancy. For this and other reasons, although OO databases excel at handling some data types, they have not become major players in the database market.