Architecture Data Models Data Abstraction Data abstraction means

Architecture & Data Models Data Abstraction: • Data abstraction means the details of data storage are hided from the users who do not need them. Levels of Abstraction: 1. Physical level: Describes how a record (e. g. , customer) is stored. 2. Logical level: Describes data stored in database, and the relationships among the data. 3. View level: Application programs hide details of data types. Views can also hide information (such as an employee’s salary) for security purposes.


Database Schema: • The description of a database is called as database schema. • I t is specified during database design. • It includes the descriptions of the database structure and the constraints that should hold on the database. • It is not expected to change frequently. Schema Diagram: • A diagrammatic display of (some aspects of) a database schema is called schema diagram.

Database Instance/Database State: • The actual data stored in a database at a particular moment in time is called as database instance , database state or database occurrence. Schemas VS Instances: • The database schema changes very infrequently. The database state changes every time the database is updated. Schema is also called intension, whereas state is called extension.

DBMS 3 - Tier Architecture:

In this DBMS architecture, schemas can de defined in three levels: 1. Internal level. 2. Conceptual level. 3. External level. 1. Internal Level: • The internal level has an internal schema. • It describes the physical storage structure of the database. • The internal schema uses physical data model, which describes the complete details of data storage, access paths for the database, and how the data’s are retrieved or inserted in the database.

2. Conceptual Level: • The conceptual level has a conceptual schema. • It describes the whole database for different users who access the database. • The conceptual schema hides the details of the physical storage structures and concentrates basically on entities, relationships, and constraints. 3. External Level: • External level includes a number of external schemas or user views. • Each external schema describes the part of the database that a particular user group is interested in and hides the rest of the database from that user groups.

• The three schemas are only descriptions of data. • The data actually exists is at the physical level. • DBMS transforms users request specified on an external schema into a request against the conceptual schema and then into a request against internal schema for processing over the database. • The request and retrieval must be reformatted to match user’s external view. • The process of transforming requests and results between levels are called mappings.

Data Independence: • Data independence is the defined as the capacity to change the schema at one level of database system without having to change the schema at next higher level. • There are two types of data independence: 1. Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their application programs. 2. Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema.

Data Models: • Data model is defined as a set of concepts to describe the structure of a database, and certain constraints that the database should obey. • In other words data model is a collection of tools for describing: 1. 2. 3. 4. Data relationships Data consistency constraints Database Operations. 4. 1. Basic Operations: operations for retrievals and updates on the database. 4. 2. User defined Operations: Operations as compute_sum, Compute_percentage etc.

Categories of data model: 1. High Level / Conceptual data model. 2. Low Level/ Physical data model. 3. Representational/ Implementation data model. 4. High Level / Conceptual data model: • High level provides concepts that are close to the way many users perceive data. • It uses concepts such as Entities, Attributes and Relationships.

Low Level/ Physical data model: • Physical data model describes how data is stored in the computer by representing information such as record formats, record orderings and access path. Representational / Implementation data model: • These data models are used most frequently. They include Hierarchical data model, Network data model and Relational data model.

Hierarchical Data Model: • The hierarchical data model organizes data in a tree structure. • There is a hierarchy of parent and child data segments. • This structure implies that a record can have repeating information, generally in the child data segments. • Data is a series of records, which have a set of field values attached to it. • It collects all the instances of a specific record together as a record type. • These record types are the equivalent of tables in the relational model, and with the individual records being the equivalent of rows.

• To create links between these record types, the hierarchical model uses Parent Child Relationships. • These are a 1: N mapping between record types. • This is done by using trees. • For example, an organization might store information about an employee, such as name, employee number, department, salary. • The organization might also store information about an employee's children, such as name and date of birth. • The employee and children data forms a hierarchy, where the employee data represents the parent segment and the children data represents the child segment.

• If an employee has three children, then there would be three child segments associated with one employee segment. • In a hierarchical database the parent-child relationship is one to many. • This restricts a child segment to having only one parent segment. • Hierarchical DBMSs were popular from the late 1960 s to 1070 s.

Network Model: • The popularity of the network data model coincided with the popularity of the hierarchical data model. • Some data were more naturally modeled with more than one parent per child. • So, the network model permitted the modeling of many-to -many relationships in data. • In 1971, the Conference on Data Systems Languages (CODASYL) formally defined the network model. • The basic data modeling construct in the network model is the set construct. • A set consists of an owner record type, a set name, and a member record type. • A member record type can have that role in more than one set, hence the multiparent concept is supported.

• An owner record type can also be a member or owner in another set. • The data model is a simple network, and link and intersection record types may exist, as well as sets between them. • Thus, the complete network of relationships is represented by several pair wise sets; in each set some (one) record type is owner (at the tail of the network arrow) and one or more record types are members (at the head of the relationship arrow). • Usually, a set defines a 1: M relationship, although 1: 1 is permitted. • The CODASYL network model is based on mathematical set theory.

Relational Model • RDBMS is a databased on the relational model developed by E. F. Codd. • A relational database allows the definition of data structures, storage and retrieval operations and integrity constraints. • In such a database the data and relations between them are organized in tables. • A table is a collection of records and each record in a table contains the same fields. • Properties of Relational Tables: 1. 2. 3. 4. 5. 6. 7. Values Are Atomic. Each Row is Unique Column Values Are of the Same Kind The Sequence of Columns is Insignificant The Sequence of Rows is Insignificant Each Column Has a Unique Name.

• Certain fields may be designated as keys, which means that searches for specific values of that field will use indexing to speed them up. • Where fields in two different tables take values from the same set, a join operation can be performed to select related records in the two tables by matching values in those fields. • As these relationships are only specified at retrieval time, relational databases are classed as dynamic database management system. • The RELATIONAL database model is based on the Relational Algebra.

Object/Relational Model: • Object/relational database management systems (ORDBMSs) add new object storage capabilities to the relational systems at the core of modern information systems. • These new facilities integrate management of traditional fielded data, complex objects such as timeseries and geospatial data and diverse binary media such as audio, video, images, and applets. • By encapsulating methods with data structures, an ORDBMS server can execute complex analytical and data manipulation operations to search and transform multimedia and other complex objects.

Object-Oriented Model: • Object DBMSs add database functionality to object programming languages. • They bring much more than persistent storage of programming language objects. • Object DBMSs extend the semantics of the C++ and Java object programming languages to provide full-featured database programming capability, while retaining native language compatibility. • A major benefit of this approach is the unification of the application and database development into a seamless data model and language environment. • As a result, applications require less code, use more natural data modeling, and code bases are easier to maintain. • Object developers can write complete database applications with a modest amount of additional effort.

Database Languages: • Data Definition Language DDL. • Storage Definition Language SDL • View Definition Language VDL • Data Manipulation Language DML – High level or nonprocedural DML. (set at a time) – Low level or Procedural DML. (Record at a time)

DBMS Interfaces: • Menu Based interfaces for browsing. • Forms based interfaces. • Graphical user interfaces. • Natural language interfaces. • Interfaces for parametric users. • Interfaces for the DBA.
- Slides: 23