Sei sulla pagina 1di 7

Chapter One: Introduction to database systems Characteristics of data, database models, hierarchical modelnetwork modelrelational model object oriented

model-object relational modeldeductive inference model,advantages & disadvantages of different models, Comparison between various database models. Characteristics of data: The first step in identifying and locating information about the data is to create a list of candidate systems. This list will make it possible to determine which databases exist in support of those candidate systems. The next step will require determining who owns the databases and where they are physically located. It will also include relevant design information and such basic information as brand, model, and revisions of the database technology. Finally, the properties and structure of the databases are defined including database integrity, data latency and data format. When analyzing databases for application integration, integrity issues constantly crop up. In order to address these issues, it is important to understand the rules and regulations that were applied to the construction of the database. Data latency, the characteristic of the data that defines how current the information needs to be, is another property of the data that needs to be determined for the purposes of application integration. Such information will allow application integration architects to determine when the information should be copied, or moved, to another enterprise system and how fast. Another identifying component of data is data format. How information is structured, including the properties of the data elements existing within that structure can be gleaned from knowledge of the data format. Likewise, length, data type (character or numeric), name of the data element, and what type of information stored (binary, text, spatial, and so on) are additional characteristics of the data that may be determined by its format. Database models: A database model is a collection of logical constructs used to represent the data structure and the data relationships found within the database. Database models can be grouped into two categories: Conceptual models and implementation models. The conceptual model focuses on the logical nature of the data representation. It is concerned with what is represented in the database, rather than with how it is represented. In contrast, an implementation model places the emphasis on how the data are represented in the database or on how the data structures are implemented to represent what is modeled. Implementation models include the hierarchical database model, the network database model, the relational database model, the object-oriented database model, object relational database model and deductive inference model. Hierarchical Model: Data in the hierarchical model is represented by collection of records and relationships among the data are represented by connected links. The links can be viewed as pointers. The records in the database are represented in the form of a tree. Hierarchical models basic logical structure is best understood when we examine a manufacturing or production process. A final product has many components. A component has many smaller assemblies. An assembly may contain many parts. The production process is based on data relationships that remain fixed over time. Whether the product is produced today or tomorrow, the same parts are put together in the same ways to produce the same assemblies that are combined to produce the same components that are assembled in the same way to get the final product.
1

Advantages: Conceptual simplicity-the relationship between the various layers is logically simple Data security- Data security is provided and enforced by the DBMS. Therefore security is enforced uniformly throughout the system. Data independence-The DBMS creates an environment in which data independence can be maintained. Database integrity-Given the parent/child relationship, there is always a link between the parent segment and its child segment(s). Because the child segment is always automatically references to its parent, the hierarchical model promotes database integrity. Efficiency The hierarchical database model is very efficient when a database contains a very large volume of data in 1:M relationships and when users require large number of transactions, using data whose relationships are fixed over time. Disadvantages: Complex implementation- The implementation of database is complex, because it requires a detailed knowledge of the physical data storage characteristics. Difficult to manage- Any changes in the database structure, such as the relocation of segments, require changes in all application programs that access the database. Lack of structural independence- Structural independence exists when changes in the database structure do not affect the DBMSs ability to access the data. The hierarchical database is known as a navigational system because data access requires that the physical storage path be used to navigate to the appropriate segments. Within a navigational database system, the programmer must know the access paths to relevant segments (the parent record must be accessed first, in order to access the child records) to retrieve data from the database. Modifications in the database structure can lead to problems with application programs that were operating correctly before the changes were made. Lack of user friendliness - Application programmers and end users must know precisely how the data are distributed physically within the database in order to access the data. Even if they understand the access paths to the data, getting to the data requires knowledge of pointers. Therefore, hierarchical databases are said to be written by programmers for programmers. Implementation limitations- Many common relationships do not conform to the 1:M standard required by the hierarchical model. For example, consider a student enrolled at a university. Each course can contain many students and each student can take many courses. Such a common many-to-many(M:N) relationships are based on a child with multiple parents. Lack of standards- Although the basic hierarchical model is incorporated in all hierarchical database software, there is no precise set of standard concepts, nor does the implementation of the model conform to a specific standard. Therefore, moving from one hierarchical DBMS to another becomes difficult (lack of portability). Network Model: It is same as hierarchical model, except that here, the records in the database are represented in the form of a graph. The network database model was created to represent complex data relationships more effectively than the hierarchical model could, to improve database performance and to impose to a database standard. As in the hierarchical model, in network model also, the user perceives the network database as a collection of records in 1:M relationships. However, quite unlike the hierarchical model, the network model allows a record to have more than one parent.
2

Using network database terminology, a relationship is called a set. Each set is composed of a tleast two records types: an owner record that is equivalent to the hierarchical modls parent and a member reocrd that is equivalent to the hierarchical models child. The difference between the hierarchical model and and the network model is that the latter might include a condition in which a reord can appear (as a member) in more than one set. In other words, a member may have several owners. A set represents a 1:M relationship between the owner and the member. Advantages: The network database model retains many of the hierarchical database modles advantages, while it corrects or improves many of the hierarchical models shortcomings. Conceptual simplicity-Like the hierarchical database model, the conceptual view of the database is simple, thus promoting design simplicity. Handles more relationship types- M:N relationships are easier to implement in thenetwork database model. For example, the network database model can handle the relationship expressed by a product may be sold to many customers and a customer can buy any product easily in the multipl -owner environment. Data access flexibility- Data access flexibility is superior to that found in the hierarchical model. An application can access an owner record and all the member records within a set. Therefore, if a member record has two or more owners, you can move directly from one owner to another. (In short, there is no longer a need for a preorder traversal, as in hierarchical model). Promotes database integrity- The network database model enforces database integrity because the user must first define the owner record and then the member. ( A member cannot exist without an owner). Data independence- The network database model achieves sufficient data independence to at least partially isolate the programs from complex physical storage details. Conformance to standards- The network database model adheres to the database standards imposed in DDL and DML, thus greatly facilitating database administration and portability. Disadvantages: System complexity- Like the hierarchical model, the network model provides a navigational data access environment, in which data are accessed one record at a time. Consequently, database administrators, programmers and end users must be very familiar with the internal structures in order to access the database. Lack of Structural Independence Due to its navigational access environment, it remains difficult to make structural changes in network database. If changes are made to the database structure, all application programs must be revalidated before they can access the database. Relational Model: The relational model, was first developed by E.F.Codd in 1970. The relational model differs from the network and hierarchical models. The relational model does not use pointers or links. Instead, the relational model relates records by the values they contain. This freedom from the use of pointers allows a formal mathematical foundation for the relational database management system. The relational model represents both data (entities) and relationships among data in the form of tables. Each table has multiple columns and each column has a unique name. Advantages: Structural independence-Because the relational database model does not use a navigational data access system, data access paths are irrelevant to relational database designers, programmers and end users. Changes in the relational database structure do not affect the DBMSs data access in any way. Therefore, the relational database model achieves the structural independence not found in the hierarchical and network database models. (Structural independence exists when it is possible to make
3

changes in the database structure without affecting the DBMSs ability to access the data. In contrast to the relational database, any change in the hierarchical databases tree structure or in the network databases sets will affect the data access paths, thus requiring changes in all data access programs). Improved conceptual simplicity-Although the hierarchical and network database models were conceptually much simpler than the file management systems they replaced, the relational database model is even simpler at the conceptual level. Because the relational database model gives us the luxury of ignoring physical data storage characteristics, we can concentrate on the logical view of the database. Easier database design, implementation, management and use-Because the relational model achieves both data independence and structural independence, it becomes much easier to design the database and to manage the contents. Ad hoc query capability-One of the reasons for the relational database models rise to dominance in the database market is its very powerful and flexible query capability. RDBMS makes use of SQL (Structured Query Language). SQL is a fourth-generation language (4GL). A 4GL allows the user to specify what must be done without specifying how it must be done. Consequently, relational database requires much less programming than any other database or file environment. Hidden from the end user, the SQL engine within the RDBMS does the tough database Jobs. In any RDBMS, SQL is used to create table structures, to maintain the data dictionary and the system catalog, to translate user requests into a format that the computer can handle and to maintain the database. Disadvantages Substantial hardware and system software overhead-The same RDBMS that hides most of the systems complexity is also the cause of its need for substantial hardware and operating system overhead. It simply takes a more powerful computer to perform all the RDBMS-assigned tasks. Consequently, the relational database system tends to be slower than the other database systems. However, given the rapid growth of hardware capability and the constant stream of operating system improvements, the slow label is beginning to fade. Poor design and implementation is made easy-In a sense, the relational environments easy-to-use asset also becomes its liability. Relational software, especially at the microcomputer level, is so simple to use that relatively untrained people find it easy to generate handy reports and aqueries without giving much thought to the need to design a proper database. As the database grows, lack of proper design tends to slow the system down. Because the relational databases disadvantages are relatively minor when compared to its substantial advantages, the relational database has become the dominant factor in the production database arena. However, the ever-increasing complexity of the data environment has caused database professionals to continue the search for alternate data modeling concepts. Diagrams Hierarchical Model:

Network Model:

Relational Model:

Comparison between various database models: Operation Insert operation Hierarchical We cannot insert the information of a child who does not have any parent. There are multiple occurrences of child records, which lead to problem of inconsistency during the update operation. There are multiple occurrences of child records, which lead to problem of inconsistency during the delete operation. Retrieve algo are complex and asymmetric Network No Problem Relational No Problem

Update operation

No Problem

No Problem

Delete Operation

No Problem

No Problem

Retrieve Operation

Retrieve algorithms complex symmetric

Retrieve are algorithms and simple symmetric

are and

Network model is free from update anomalies because there is only a single occurrence for each record set. Relational model is free from update anomalies because it removes the redundancy of data by proper designing. Object oriented model or Object oriented database management system (OODBMS): When database capabilities are combined with object-oriented programming language capabilities, the result is an object-oriented database management system (OODBMS). The necessary characteristics that a system must satisfy to be considered as an OODBMS can be broadly divided into OO language properties and database requirements.
5

First, the rules that make it an object-oriented system are as follows: The system must support complex object. A system must provide simple atomic types of objects from which complex objects can be built by applyi ng constructors to atomic objects or other complex objects or both. Object identity must be supported. A data object must have an identity and existence independent of its values. Objects must be encapsulated. The system must support types or classes. The system must support either the type concept or the class concept. The system must support inheritance. The system must be computationally complete. The system must be extensible. The user of the system should be able to create new types that have equal status to the systems predefined types. Second, these rules that make it a DBMS: It must be persistent, able to remember an object state. It must be able to manage very large databases. It must accept concurrent users. It must be able to recover from hardware and software failures. Data query must be simple. OODBMS allow object-oriented programmers to develop the product, store them as objects, and replicate or modify existing objects to make new objects within the OODBMS. Because the database is integrated with the programming language, the programmer can maintain consistency within one environment, in that both the OODBMS and the programming language will use the same model of representation. Relational DBMS projects, by way of contrast, maintain a clearer division between the database model and the application. As the usage of web-based technology increases with the implementation of Intranets and extranets, companies have a vested interest in OODBMS to display their complex data. Using a DBMS that has been specifically designed to store data as objects gives an advantage to those companies that are geared towards multimedia presentation or organizations that utilize computer-aided design (CAD). An object database stores complex data and relationships between data directly, without mapping to relational rows and columns, and this makes them suitable for applications dealing with very complex data. Objects have a many to many relationship and are accessed by the use of pointers. Pointers are linked to objects to establish relationships. Another benefit of an OODBMS is that it can be programmed with small procedural differences without affecting the entire system. This is most helpful for those organizations that have data relationships that are not entirely clear or need to change these relations to satisfy the new business requirements. Potential advantages: 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.
6

Potential disadvantages: 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. Applications: OODBMSs are applicable for information management problems that are characterized by the need to manage A large number of different data types. A large number of relationships between the objects. Objects with complex behaviors. Object relational system or Object relational database management system (ORDBMS): In practice, even though many applications increasingly are developed in an object-oriented programming technology, chances are good that the data those applications need to access live in a very different universe- a relational database. The main process in relational and object integration is defining the relationships between the table structures in the relational database with classes in the object model. An object-relational database can be said to provide a middle ground between relational databases and object-oriented databases (OODBMS). In object-relational databases, the approach is essentially that of relational databases: the data resides in the database and is manipulated collectively with queries in a query language; at the other extreme are OODBMSs in which the database is essentially a persistent object store for software written in an object-oriented programming language, with a programming API for storing and retrieving objects, and little or no specific support for querying. The basic goal for the Object-relational database is to bridge the gap between relational databases and the object-oriented modeling techniques used in programming languages such as Java, C++, Visual Basic .NET or C#. Whereas traditional RDBMS or SQL-DBMS products focused on the efficient management of data drawn from a limited set of data-types (defined by the relevant language standards), an objectrelational DBMS allows software developers to integrate their own types and the methods that apply to them into the DBMS. Deductive inference model is a database management system that can make deductions (i.e., conclude additional facts) based on rules and facts stored in the (deductive) database. Datalog is the language typically used to specify facts, rules and queries in deductive databases. Deductive databases have grown out of the desire to combine logic programming with relational databases to construct systems that support a powerful formalism and are still fast and able to deal with very large datasets. Deductive databases are more expressive than relational databases but less expressive than logic programming systems. In recent years, deductive databases have found new application in data integration, information extraction, networking, program analysis, security, and cloud computing.

Potrebbero piacerti anche