Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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)
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
Consistency constraints A data model provide a way to describe the design of a database at the physical, logical and view level
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 (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
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
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