Sei sulla pagina 1di 9

Definition of DBMS

A software system that enables users to define, create, and maintain the database and that provides controlled access to this database. A database management system (DBMS) is a collection of interrelated data (database) and a set of programs to access those data.

Objective of DBMS
Provide a way for efficient data management storage and retrieval of the information Manage large bodies of information Defining structures for the storage of information Providing the mechanisms for the manipulation of the information Ensure the safety of the information stored Avoid abnormal results when sharing the DB among several users

Database System Applications


Banking: all transactions Airlines: reservations, schedules Universities: registration, grades, student information Sales: customers, products, purchases Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions Telecommunications: keeping record of calls made, generating monthly bills

Components Of DBMS

Hardware Can range from a PC to a network of computers. Software DBMS, operating system, network software (if necessary) and also the application programs.

Data Used by the organization and a description of this data called the schema. Procedures Instructions and rules that should be applied to the design and use of the database and DBMS. People Data Administrator (DA) Database Administrator (DBA) Database Designers (Logical and Physical) Application Programmers End Users (naive and sophisticated)

a) b) c) d) e)

Purpose of Database Systems Limitations of File Systems


In the early days, database applications were built on top of file systems Data is stored in separate files Data is manipulated by a set of application programs As time goes by, the number of files and application programs increases increasing complexity of database application management Drawbacks of using file systems to store data Data redundancy and inconsistency Redundancy: duplication of information in different files Inconsistency: the various copies of the same data may be different Difficulty in accessing data Need to write a new program to carry out each new task Data isolation multiple files and formats Because data are scattered in various files, and files may be in different formats, writing the appropriate information to retrieve the appropriate data is difficult Integrity problems Data values stored in the database must satisfy certain types of consistency constraints Integrity constraints (e.g. account balance > 0) become part of program code Those constraints are forced by the database system developer Hard to add new constraints or change existing ones Atomicity of updates Failures may leave database in an inconsistent state with partial updates carried out E.g. transfer of funds from one account to another should either complete or not happen at all Concurrent access by multiple users Concurrent accessed needed for performance

Uncontrolled concurrent accesses can lead to inconsistencies E.g. two people reading a balance and updating it at the same time Security problems Not every user of the database should be able to access all the data

View of Data in a Database Data Abstraction Levels


Physical Level: describes how the data is actually stored Describes low level data structures Logical Level: describes what data are stored in the database and what relationships exist between data View Level: describes only part of the entire database

Data Models Definition


The Data Model: a collection of conceptual tools for describing Data Data relationship Data semantics Consistency constraints A data model provide a way to describe the design of a database at the physical, logical and view level The Data Model: a collection of conceptual tools for describing Data Data relationship Data semantics

Consistency constraints A data model provide a way to describe the design of a database at the physical, logical and view level

The Relational Model


The Relational Model: uses a collection of tables to represent both data and the relationship among those data. Each table has multiple column and each column has a unique name (Attribute) The most widely used as a data model for databases Vast majority of current database systems are based on the relational model Properties of Relational model Data is stored in terms of rows and columns in a table known as relations The position of a row in a table is of no importance The intersection of a row and column must give a single value and not a set of values Row must be unique Column names must be unique

Sample of a Relational database

Advantages Structural independence Improved conceptual simplicity Easier database design, implementation, management, and use Ad hoc query capability with SQL Powerful database management system Disadvantages Substantial hardware and system software overhead Poor design and implementation is made easy May promote islands of information problems E.F Codd rules 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Information Representation Guaranteed Access Systematic Treatment of null values Database Description Comprehensive Data Sub language View Updating High level Insert,update,delete Physical data independence logical data 1Independence The Distribution rule Non Subversion Integrity rule

The Entity-Relationship Model

The Entity-Relationship (E-R) Model: it is based on the perception of a real world that consists of a collection basic objects called entities and of relationships among those objects. An entity is a thing or object from the real world that is distinguishable from other objects e.g. customers, accounts, bank branch A relationship is an association among several entities e.g. the account Ac1234 is held by the customer Mr. Abdullah This model is also widely used in database design The Entity-Relationship (E-R) Model: it is based on the perception of a real world that consists of a collection basic objects called entities and of relationships among those

Rectangles: represent the set of entities Ellipses: represent the attributes of an entity Diamonds: represent the set of relationships among a member from each of several entity sets Lines: link the attributes to entity sets and entity sets to relationships

Data Language Definition


A database system provides a data definition language to specify the database schema a data manipulation language to express database queries and update In practice, both languages are not separate e.g. SQL (Structured Query Language)

Data Definition Language (DDL)


Data Definition Language: specifies the notation for defining the database schema e.g. create table account ( account-number char (10), balance integer )

DDL compiler generates a set of tables stored in a data dictionary Data dictionary contains metadata (i.e., data about data) The schema of a table is an example of metadata Data storage and definition language Usually an extension of the data definition language Language in which the storage structure and access methods used by the database system are specified Hidden from the user of the database

Data Manipulation Language (DML)


Language for accessing and manipulating the data organized by the appropriate data model DML also known as query language Data manipulation is: The retrieval of information stored in the database The insertion of new information into the database The deletion of the information from the database The modification (update) of the information from the database Two classes of languages Procedural user specifies what data is required and how to get those data Declarative (Nonprocedural) user specifies what data is required without specifying how to get those data (e.g. SQL) Easy to learn and to use The database system has to figure out an efficient means of accessing the data SQL is the most widely used query language A Query is a statement requesting the retrieval of the information

Database Users
People who work with a database can be categorized as database users or database administrators Users are differentiated by the way they expect to interact with the system Four types of database users Nave users: invoke one of the permanent application programs that have been written previously E.g. Bank cashier, people accessing a database over the web The typical user interface for nave user is a form interface where the user just fill in the appropriate fields of the form Application programmers: computer professional that write application programs Choose a tool from many tools to build a user interface to the database Interact with the system through DML calls Sophisticated users: Interact with the system without writing programs

Form their requests using a database query language (e.g. Analysts) Specialized users: write specialized database applications that do not fit into the traditional data processing framework E.g. computer-aided design systems, expert systems, environement modeling systems

Database Administrators
The Database Administrator (DBA) Coordinates all the activities of the database system The DBA has a good understanding of the enterprises information resources and needs The DBA has central control over the system Database administrator's duties include: Schema definition, specifying integrity constraints Storage structure and access method definition Schema and physical organization modification Granting user authority to access the database Acting as liaison with users Monitoring performance and responding to changes in requirements Routine maintenance (DB backup, Ensuring free space for the DB, etc )

Application Architectures
(Most of) Database systems are accessed remotely through a network The Client/Server Model Client machines, on which remote database users work Server machines, on which the database system runs

Two-Tiered Architecture The application is partitioned into a component that resides at the client machine It remotely invokes the database server machine through query languages statements E.g. using ODBC, JDBC for interaction between the client and the server Three-Tiered Architecture The client machine acts as a front-end and does not contain any direct database calls

The client machine communication with the server application through an interface of forms (not direct queries) The server application communicate with a database system to access data

Potrebbero piacerti anche