database concepts
1.
In computing, a structured collection of data, which may be manipulated to select and sort desired items of information. For example, an accounting system might be built around a database containing details of customers and suppliers. In other word, A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. In one view, databases can be classified according to types of content: bibliographic, full-text, numeric, and images. In larger computers, the database makes data available to the various programs that need it, without the need for those programs to be aware of how the data are stored. The term is also sometimes used for simple record-keeping systems, such as mailing lists, in which there are facilities for searching, sorting, and producing records.
2.
database management systems
A database management system (DBMS) consists of software that organizes the storage of data. A DBMS controls the creation, maintenance, and use of the database storage structures of organizations and of their users. It allows organizations to place control of organization wide database development in the hands of Database Administrators (DBAs) and other specialists. In large systems, a DBMS allows users and other softwares to store and retrieve data in a structured way.
Database management systems are usually categorized according to the database model that they support, such as the network, relational or object model. The model tends to determine the query languages that are available to access the database. One commonly used query language for the relational database is SQL,
3.
Relational databases
Relational databases, as implemented in relational database management systems, have become a predominant choice for the storage of information in new databases used for financial records, manufacturing and logistical information, personnel data and much more. Relational databases have often replaced legacy hierarchical databases and network databases because they are easier to understand and use, even though they are much less efficient. As computer power has increased, the inefficiencies of relational databases, which made them impractical in earlier times, have been outweighed by their ease of use. However, relational databases have been challenged by Object Databases, which were introduced in an attempt to address the object-relational impedance mismatch in relational database, and XML databases.
The three leading commercial relational database vendors are Oracle, Microsoft, and IBM.The three leading open source implementations are MySQL, PostgreSQL, and SQLite.
4.
RDBMS components
Most DBMS as of 2009 are relational DBMS:
1-
Interface drivers - A user or application program initiates either schema modification or content modification. These drivers are built on top of SQL. They provide methods to prepare statements, execute statements, fetch results, etc. Examples include DDL, DCL, DML, ODBC, and JDBC. Some vendors provide language-specific proprietary interfaces. For example MySQL provides drivers for PHP, Python, etc.
2-
SQL engine - This component interprets and executes the SQL query. It
comprises three major components (compiler, optimizer, and execution engine).
3-
Transaction engine - Transactions are sequences of operations that read or
write database elements, which are grouped together.
4-
Relational engine - Relational objects such as Table, Index, and Referential integrity constraints are implemented in this component.
5-
Storage engine - This component stores and retrieves data records. It also
provides a mechanism to store metadata and control information such as undo logs, redo logs, lock tables, etc.
5.
Storage structures
Databases may store relational tables/indexes in memory or on hard disk in one of many forms:
- ordered/unordered flat files
- ISAM
- heaps
- hash buckets
- B+ trees
These have various advantages and disadvantages. The most commonly used are B+ trees and ISAM.
6.
Indexing
All of these databases can take advantage of indexing to increase their speed.
An index allows a set of table rows matching some criterion to be quickly located. Usually, a database designer selects specific techniques to increase efficiency in the particular case of the type of index required.
An index speeds up access to data, but it has disadvantages as well. First, every index increases the amount of storage used on the hard drive which is also necessary for the database file, and second, the index must be updated each time the data are altered, and this costs time.
A special case of an index is a primary index based on a primary key: a primary index must ensure a unique reference to a record. Often, for this purpose one simply uses a running index-number (ID number). Primary indexes play a significant role in relational databases, and they can speed up access to data considerably.
7.
In addition to their data model, most practical databases ("transactional databases") attempt to enforce database transactions. Ideally, the database software should enforce the ACID rules, summarized here:
1- Atomicity: Either all the tasks in a transaction must be done, or none of them. The transaction must be completed, or else it must be undone (rolled back).
2- Consistency: Every transaction must preserve the integrity constraints — the declared consistency rules — of the database. It cannot leave the data in a contradictory state.
3- Isolation: Two simultaneous transactions cannot interfere with one another. Intermediate results within a transaction must remain invisible to other transactions.
4- Durability: Completed transactions cannot be aborted later or their results discarded. They must persist through (for instance) restarts of the DBMS after crashes.
In practice, many DBMSs allow the selective relaxation of most of these rules — for better performance.
8.
Applications
Databases function in many applications, spanning virtually the entire range of computer software. Databases are the preferred method of storage for large multiuser applications, where coordination between many users is needed. Even individual users find them convenient, and many electronic mail programs and personal organizers are based on standard database technology. Software database drivers are available for most database platforms so that application software can use a common API to retrieve the information stored in a database. Commonly used database APIs include JDBC and ODBC.
9.
Replication
Replication of databases often relates closely to transactions. If a database can log its individual actions, one can create a duplicate of the data in real time. The duplicate can be used to improve performance and/or availability of the whole database system.
Common replication concepts include:
- master/slave Replication: All write-requests are performed on the master and
then replicated to the slave(s)
- quorum: The result of Read and Write requests are calculated by querying a
"majority" of replicas
- multimaster: Two or more replicas sync each other via a transaction identifier
Parallel synchronous replication of databases enables the replication of transactions on multiple servers simultaneously, which provides a method for backup and security as well as data availability. This is commonly referred to as
database clustering
10.
Security
Database security denotes the system, processes, and procedures that protect a database from unintended activity. Enforcing security is one of the major tasks of the DBA.
DBMSs usually enforce security through access control, auditing, and encryption:
-Access control ensures and restricts who can connect and what can be done to
the database.
- Auditing logs what action or change has been performed, when and by whom.
- Encryption: many commercial database vendors provide built-in encryption
mechanisms. Data is encoded natively into the tables and deciphered "on the fly" when a query comes in. Connections can also be secured and encrypted if required using DSA, MD5, SSL or legacy encryption standards.
11.
Databases in New Media
Within New Media, databases are a collection of items in which the user can carry out various operations such as viewing, navigating, create, and searching. Though there are various types of items within the database, each item has the same significance. Unlike a narrative or film, the collections are computerized and therefore may offer a unique experience with each view. This form of data may present a unique presentation of what the world is like. Databases can be seen as a symbolic form of the computer age