39
A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when there is a large amount of data security and integrity of the data are important many users access the data concurrently

A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when there is a large amount of data

Embed Size (px)

Citation preview

Page 1: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

A database is any collection of data.

A DBMS is a software system designed to maintain a database.

We use a DBMS when there is a large amount of data security and integrity of the data are important many users access the data concurrently

Page 2: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Concurrent UseStructured DataSeparation of Data and ApplicationsData IntegrityTransactionsData PersistenceData Views

Page 3: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

A database system allows several users to access the database concurrently. Answering different questions from different users with the same (base) data is a central aspect of an information system. Such concurrent use of data increases the economy of a system. Data capturing and data storage is not redundant, the system can be operated from a central control and the data can be updated more efficiently

Page 4: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

A fundamental feature of the database approach is that the database system does not only contain the data but also the complete definition and description of these data. These descriptions are basically details about , the structure, the type and the format of all data and, additionally, the relationship between the data. This kind of stored data is called metadata ("data about data"). Structured Data:Data is called structured if it can be subdivided systematically and linked.

Page 5: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

 software application does not need any knowledge about the physical data storage like encoding, format, storage place, etc. It only communicates with the management system of a database (DBMS) via a standardised interface with the help of a standardised language like SQL. The access to the data and the metadata is entirely done by the DBMS. In this way all the applications can be totally separated from the data. Therefore database internal reorganisations or improvement of efficiency do not have any influence on the application software.

Page 6: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Data integrity ensures the quality and the reliability of the data of a database system.Data integrity includes also the protection of the database from unauthorized access (confidentiality) and unauthorized changes.. A DBMS should bring only correct and consistent data into the database. Additionally, correct transactions ensure that the consistency is maintained during the operation of the system.An example for inconsistency would be if contradictory statements were saved in the same database.

Page 7: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

A transaction is a bundle of actions which are done within a database to bring it from one consistent state to a new consistent state. In between the data are inevitable inconsistencies. A transaction is atomic, which means it cannot be divided up any further. Within a transaction all or none of the actions need to be carried out. Doing only a part of the actions would lead to an inconsistent database state.

Page 8: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Data persistence means that in a DBMS all data is maintained as long as it is not deleted explicitly. The life span of data needs to be determined directly or indirectly be the user and must not be dependent on system features. Additionally data once stored in a database must not be lost. Changes of a database which are done by a transaction are persistent. When a transaction is finished even a system crash cannot put the data in danger.

Page 9: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Typically, a database has several users and each of them, depending on access rights and desire, needs an individual view of the data (content and form). Such a data view can consist of a subset of the stored data or from the stored data derived data (not explicitely stored).

Page 10: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

More information from given dataAd hoc queries can be performedRedundancy can be reducedInconsistency can be avoidedSecurity restriction can be appliedData independence more cost-effective: reduced development time,

flexibility, economies of scale

Page 11: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Providing backup and recovery services.Providing multiple interfaces to different classes of users.Representing complex relationships among data.Enforcing integrity constraints on the database.Drawing Inferences and Actions using rules

Page 12: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Expensive hardware, software, personnel, processing overhead,

operating cost , etc.DBMS generality & overhead => performance issueIncreased vulnerability to failureRecovery is more complex

Page 13: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data
Page 14: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

•Proposed to support DBMS characteristics of:• Program-data independence.• Support of multiple views of the data.

Page 15: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

•Defines DBMS schemas at three levels:• Internal schema at the internal level to describe

physical storage structures and access paths. Typically uses a physical data model.

• Conceptual schema at the conceptual level to describe the structure and constraints for the whole database for a community of users. Uses a conceptual or an implementation data model.

• External schemas at the external level to describe the various user views. Usually uses the same data model as the conceptual level.

Page 16: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data
Page 17: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Mappings among schema levels are needed to transform requests and data. Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution.

Page 18: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their associated application programs.Physical Data Independence:The capacity to change the internal schema without having to change the conceptual schema.For example, the internal schema may be changed when certain file structures are reorganized to improve Database performance

Data independence is defined as the capacity to change the schema at one level of database s/m with out having to change the schema at next higher level.

Types of DI:

Page 19: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

When a schema at a lower level is changed, only the mappings between this schema and higher-level schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas.

Page 20: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

A database model is a type of data model that determines the logical structure of a database and fundamentally determines in which manner data can be stored, organized, and manipulated. Common data models for databases include:Hierarchical database modelNetwork modelRelational modelEntity–relationship model Enhanced entity–relationship model

Object model

Page 21: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Logically represented by an upside down TREEEach parent can have many childrenEach child has only one parentThe top layer is perceived as the parent of the segment directly beneath it.The segments below other segments are the children of the segment above them.

SALIENT FEATURES

Page 22: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data
Page 23: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Conceptual simplicity

Data independence

Efficiency dealing with a large database

Page 24: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Complex implementation

Difficult to manage and lack of standards

Lacks structural independence

Applications programming and use complexity

Implementation limitations (no M:N relationship)

Page 25: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Developed in mid 1960s as part of work of CODASYL (Conference on Data Systems Languages)The network model has greater flexibility than the hierarchical model for handling complex relationshipsObjective of network model is to separate data structure from physical storage, eliminate unnecessary duplication of data with associated errors and costs The Network Database Model was created for three main purposes :

- representing a complex data relationship more effectively

- improving database performance- imposing a database standard

Page 26: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Major characteristic of this database model is that it comprises of at least two record types ; the owner & the member.An owner is a record type equivalent to the parent type in the hierarchal database model, and the member record type resembles the child type in the hierarchal model.The network database model uses a data management language that defines data characteristics and the data structure in order to manipulate the data.

Page 27: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

The network model contains logical information such as connectivity relationships among nodes and links, directions of links, and costs of nodes and links.

Page 28: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Simplicity Ability to handle more relationship types : Ease of data access Data Integrity : Data Independence

Page 29: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

System Complexity : The structure of the network model is very difficult to change. This type of system is very complex Lack of Structural independence. Any changes made to the database structure require the application programs to be modified before they can access data.

Page 30: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data
Page 31: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

The relational model uses a collection of tables to represent both data and relation among the data

Page 32: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Table, a set of rows and columns .each column cthe has a unique name Row, a set of columns from a table reflecting a record.Primary key, often designated pk, is 1 or more columns in a table that makes a record unique. In the relational model ,a row is called a tuple ,a column header is called an attribute and the table is called a relation

Page 33: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Foreign key, often designated fk, is a common column common between 2 tables that define the relationship between those 2 tables.Foreign keys are either mandatory or optional.

Page 34: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Hardware overhead : need more powerful computing hardware and data storage devices to perform RDBMS tasks

Page 35: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Entity Relationship Model or ER is based on a perception of a real world that consists of a collection of basic objects called entities and relationship among these objects

The overall structure of a database can be represented graphically by E-R diagram

Page 36: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Entity Relationship Model or ER is build up from the following components•Rectangle: represent the entity sets•Ellipses: represents the attributes•Diamonds: relationship among entity sets•Lines :links attributes to entity sets and entity sets to relationships

Page 37: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Double ellipses: which represent multi valued AttributesDashed ellipses: which denote derived attributesDouble lines : which represent which represent total participates in an entity in a relationship setDouble Rectangle : which represent weak entity sets

Page 38: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

Index_no

Page 39: A database is any collection of data. A DBMS is a software system designed to maintain a database. We use a DBMS when  there is a large amount of data

It is based on the object –oriented –programming language paradigmsThe objects-oriented paradigm is based on the Encapsulation of data and code related to an object into a single unit , inheritance and object -identity