text:
Database

In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and analyze the data. The DBMS additionally encompasses the core facilities provided to administer the database. The sum total of the database, the DBMS and the associated applications can be referred to as a database system. Often the term "database" is also used loosely to refer to any of the DBMS, the database system or an application associated with the database.

Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spans formal techniques and practical considerations, including data modeling, efficient data representation and storage, query languages, security and privacy of sensitive data, and distributed computing issues, including supporting concurrent access and fault tolerance.

Computer scientists may classify database management systems according to the database models that they support. Relational databases became dominant in the 1980s. These model data as rows and columns in a series of tables, and the vast majority use SQL for writing and querying data. In the 2000s, non-relational databases became popular, collectively referred to as NoSQL, because they use different query languages.

Terminology and overview
Formally, a "database" refers to a set of related data accessed through the use of a "database management system" (DBMS), which is an integrated set of computer software that allows users to interact with one or more databases and provides access to all of the data contained in the database (although restrictions may exist that limit access to particular data). The DBMS provides various functions that allow entry, storage and retrieval of large quantities of information and provides ways to manage how that information is organized.

Because of the close relationship between them, the term "database" is often used casually to refer to both a database and the DBMS used to manipulate it.

Outside the world of professional information technology, the term database is often used to refer to any collection of related data (such as a spreadsheet or a card index) as size and usage requirements typically necessitate use of a database management system.

Existing DBMSs provide various functions that allow management of a database and its data which can be classified into four main functional groups:

 * Data definition – Creation, modification and removal of definitions that detail how the data is to be organized.
 * Update – Insertion, modification, and deletion of the data itself.
 * Retrieval – Selecting data according to specified criteria (e.g., a query, a position in a hierarchy, or a position in relation to other data) and providing that data either directly to the user, or making it available for further processing by the database itself or by other applications. The retrieved data may be made available in a more or less direct form without modification, as it is stored in the database, or in a new form obtained by altering it or combining it with existing data from the database.
 * Administration – Registering and monitoring users, enforcing data security, monitoring performance, maintaining data integrity, dealing with concurrency control, and recovering information that has been corrupted by some event such as an unexpected system failure.

Both a database and its DBMS conform to the principles of a particular database model. "Database system" refers collectively to the database model, database management system, and database.

Physically, database servers are dedicated computers that hold the actual databases and run only the DBMS and related software. Database servers are usually multiprocessor computers, with generous memory and RAID disk arrays used for stable storage. Hardware database accelerators, connected to one or more servers via a high-speed channel, are also used in large-volume transaction processing environments. DBMSs are found at the heart of most database applications. DBMSs may be built around a custom multitasking kernel with built-in networking support, but modern DBMSs typically rely on a standard operating system to provide these functions.

Since DBMSs comprise a significant market, computer and storage vendors often take into account DBMS requirements in their own development plans.

Databases and DBMSs can be categorized according to the database model(s) that they support (such as relational or XML), the type(s) of computer they run on (from a server cluster to a mobile phone), the query language(s) used to access the database (such as SQL or XQuery), and their internal engineering, which affects performance, scalability, resilience, and security.

History
The sizes, capabilities, and performance of databases and their respective DBMSs have grown in orders of magnitude. These performance increases were enabled by the technology progress in the areas of processors, computer memory, computer storage, and computer networks. The concept of a database was made possible by the emergence of direct access storage media such as magnetic disks, which became widely available in the mid-1960s; earlier systems relied on sequential storage of data on magnetic tape. The subsequent development of database technology can be divided into three eras based on data model or structure: navigational, SQL/relational, and post-relational.

The two main early navigational data models were the hierarchical model and the CODASYL model (network model). These were characterized by the use of pointers (often physical disk addresses) to follow relationships from one record to another.

The relational model, first proposed in 1970 by Edgar F. Codd, departed from this tradition by insisting that applications should search for data by content, rather than by following links. The relational model employs sets of ledger-style tables, each used for a different type of entity. Only in the mid-1980s did computing hardware become powerful enough to allow the wide deployment of relational systems (DBMSs plus applications). By the early 1990s, however, relational systems dominated in all large-scale data processing applications, and they remain dominant: IBM Db2, Oracle, MySQL, and Microsoft SQL Server are the most searched DBMS. The dominant database language, standardized SQL for the relational model, has influenced database languages for other data models.

Object databases were developed in the 1980s to overcome the inconvenience of object–relational impedance mismatch, which led to the coining of the term "post-relational" and also the development of hybrid object–relational databases.

The next generation of post-relational databases in the late 2000s became known as NoSQL databases, introducing fast key–value stores and document-oriented databases. A competing "next generation" known as NewSQL databases attempted new implementations that retained the relational/SQL model while aiming to match the high performance of NoSQL compared to commercially available relational DBMSs.

1960s, navigational DBMS

The introduction of the term database coincided with the availability of direct-access storage (disks and drums) from the mid-1960s onwards. The term represented a contrast with the tape-based systems of the past, allowing shared interactive use rather than daily batch processing. The Oxford English Dictionary cites a 1962 report by the System Development Corporation of California as the first to use the term "data-base" in a specific technical sense.

As computers grew in speed and capability, a number of general-purpose database systems emerged; by the mid-1960s a number of such systems had come into commercial use. Interest in a standard began to grow, and Charles Bachman, author of one such product, the Integrated Data Store (IDS), founded the Database Task Group within CODASYL, the group responsible for the creation and standardization of COBOL. In 1971, the Database Task Group delivered their standard, which generally became known as the CODASYL approach, and soon a number of commercial products based on this approach entered the market.

The CODASYL approach offered applications the ability to navigate around a linked data set which was formed into a large network. Applications could find records by one of three methods:
 * 1) Use of a primary key (known as a CALC key, typically implemented by hashing)
 * 2) Navigating relationships (called sets) from one record to another
 * 3) Scanning all the records in a sequential order

Later systems added B-trees to provide alternate access paths. Many CODASYL databases also added a declarative query language for end users (as distinct from the navigational API). However, CODASYL databases were complex and required significant training and effort to produce useful applications.

IBM also had its own DBMS in 1966, known as Information Management System (IMS). IMS was a development of software written for the Apollo program on the System/360. IMS was generally similar in concept to CODASYL, but used a strict hierarchy for its model of data navigation instead of CODASYL's network model. Both concepts later became known as navigational databases due to the way data was accessed: the term was popularized by Bachman's 1973 Turing Award presentation The Programmer as Navigator. IMS is classified by IBM as a hierarchical database. IDMS and Cincom Systems' TOTAL databases are classified as network databases. IMS remains in use.

1970s, relational DBMS
Edgar F. Codd worked at IBM in San Jose, California, in one of their offshoot offices that were primarily involved in the development of hard disk systems. He was unhappy with the navigational model of the CODASYL approach, notably the lack of a "search" facility. In 1970, he wrote a number of papers that outlined a new approach to database construction that eventually culminated in the groundbreaking A Relational Model of Data for Large Shared Data Banks.

In this paper, he described a new system for storing and working with large databases. Instead of records being stored in some sort of linked list of free-form records as in CODASYL, Codd's idea was to organize the data as a number of "tables", each table being used for a different type of entity. Each table would contain a fixed number of columns containing the attributes of the entity. One or more columns of each table were designated as a primary key by which the rows of the table could be uniquely identified; cross-references between tables always used these primary keys, rather than disk addresses, and queries would join tables based on these key relationships, using a set of operations based on the mathematical system of relational calculus (from which the model takes its name). Splitting the data into a set of normalized tables (or relations) aimed to ensure that each "fact" was only stored once, thus simplifying update operations. Virtual tables called views could present the data in different ways for different users, but views could not be directly updated.

Codd used mathematical terms to define the model: relations, tuples, and domains rather than tables, rows, and columns. The terminology that is now familiar came from early implementations. Codd would later criticize the tendency for practical implementations to depart from the mathematical foundations on which the model was based.

The use of primary keys (user-oriented identifiers) to represent cross-table relationships, rather than disk addresses, had two primary motivations. From an engineering perspective, it enabled tables to be relocated and resized without expensive database reorganization. But Codd was more interested in the difference in semantics: the use of explicit identifiers made it easier to define update operations with clean mathematical definitions, and it also enabled query operations to be defined in terms of the established discipline of first-order predicate calculus; because these operations have clean mathematical properties, it becomes possible to rewrite queries in provably correct ways, which is the basis of query optimization. There is no loss of expressiveness compared with the hierarchic or network models, though the connections between tables are no longer so explicit.

In the hierarchic and network models, records were allowed to have a complex internal structure. For example, the salary history of an employee might be represented as a "repeating group" within the employee record. In the relational model, the process of normalization led to such internal structures being replaced by data held in multiple tables, connected only by logical keys.

For instance, a common use of a database system is to track information about users, their name, login information, various addresses and phone numbers. In the navigational approach, all of this data would be placed in a single variable-length record. In the relational approach, the data would be normalized into a user table, an address table and a phone number table (for instance). Records would be created in these optional tables only if the address or phone numbers were actually provided.

As well as identifying rows/records using logical identifiers rather than disk addresses, Codd changed the way in which applications assembled data from multiple records. Rather than requiring applications to gather data one record at a time by navigating the links, they would use a declarative query language that expressed what data was required, rather than the access path by which it should be found. Finding an efficient access path to the data became the responsibility of the database management system, rather than the application programmer. This process, called query optimization, depended on the fact that queries were expressed in terms of mathematical logic.

Codd's paper was picked up by two people at Berkeley, Eugene Wong and Michael Stonebraker. They started a project known as INGRES using funding that had already been allocated for a geographical database project and student programmers to produce code. Beginning in 1973, INGRES delivered its first test products which were generally ready for widespread use in 1979. INGRES was similar to System R in a number of ways, including the use of a "language" for data access, known as QUEL. Over time, INGRES moved to the emerging SQL standard.

IBM itself did one test implementation of the relational model, PRTV, and a production one, Business System 12, both now discontinued. Honeywell wrote MRDS for Multics, and now there are two new implementations: Alphora Dataphor and Rel. Most other DBMS implementations usually called relational are actually SQL DBMSs.

In 1970, the University of Michigan began development of the MICRO Information Management System based on D.L. Childs' Set-Theoretic Data model. MICRO was used to manage very large data sets by the US Department of Labor, the U.S. Environmental Protection Agency, and researchers from the University of Alberta, the University of Michigan, and Wayne State University. It ran on IBM mainframe computers using the Michigan Terminal System. The system remained in production until 1998.

Integrated approach
In the 1970s and 1980s, attempts were made to build database systems with integrated hardware and software. The underlying philosophy was that such integration would provide higher performance at a lower cost. Examples were IBM System/38, the early offering of Teradata, and the Britton Lee, Inc. database machine.

Another approach to hardware support for database management was ICL's CAFS accelerator, a hardware disk controller with programmable search capabilities. In the long term, these efforts were generally unsuccessful because specialized database machines could not keep pace with the rapid development and progress of general-purpose computers. Thus most database systems nowadays are software systems running on general-purpose hardware, using general-purpose computer data storage. However, this idea is still pursued in certain applications by some companies like Netezza and Oracle (Exadata).

Late 1970s, SQL DBMS
IBM started working on a prototype system loosely based on Codd's concepts as System R in the early 1970s. The first version was ready in 1974/5, and work then started on multi-table systems in which the data could be split so that all of the data for a record (some of which is optional) did not have to be stored in a single large "chunk". Subsequent multi-user versions were tested by customers in 1978 and 1979, by which time a standardized query language – SQL – had been added. Codd's ideas were establishing themselves as both workable and superior to CODASYL, pushing IBM to develop a true production version of System R, known as SQL/DS, and, later, Database 2 (IBM Db2).

Larry Ellison's Oracle Database (or more simply, Oracle) started from a different chain, based on IBM's papers on System R. Though Oracle V1 implementations were completed in 1978, it was not until Oracle Version 2 when Ellison beat IBM to market in 1979.

Stonebraker went on to apply the lessons from INGRES to develop a new database, Postgres, which is now known as PostgreSQL. PostgreSQL is often used for global mission-critical applications (the .org and .info domain name registries use it as their primary data store, as do many large companies and financial institutions).

In Sweden, Codd's paper was also read and Mimer SQL was developed in the mid-1970s at Uppsala University. In 1984, this project was consolidated into an independent enterprise.

Another data model, the entity–relationship model, emerged in 1976 and gained popularity for database design as it emphasized a more familiar description than the earlier relational model. Later on, entity–relationship constructs were retrofitted as a data modeling construct for the relational model, and the difference between the two has become irrelevant.

1980s, on the desktop
The 1980s ushered in the age of desktop computing. The new computers empowered their users with spreadsheets like Lotus 1-2-3 and database software like dBASE. The dBASE product was lightweight and easy for any computer user to understand out of the box. C. Wayne Ratliff, the creator of dBASE, stated: "dBASE was different from programs like BASIC, C, FORTRAN, and COBOL in that a lot of the dirty work had already been done. The data manipulation is done by dBASE instead of by the user, so the user can concentrate on what he is doing, rather than having to mess with the dirty details of opening, reading, and closing files, and managing space allocation." dBASE was one of the top selling software titles in the 1980s and early 1990s.

1990s, object-oriented
The 1990s, along with a rise in object-oriented programming, saw a growth in how data in various databases were handled. Programmers and designers began to treat the data in their databases as objects. That is to say that if a person's data were in a database, that person's attributes, such as their address, phone number, and age, were now considered to belong to that person instead of being extraneous data. This allows for relations between data to be related to objects and their attributes and not to individual fields. The term "object–relational impedance mismatch" described the inconvenience of translating between programmed objects and database tables. Object databases and object–relational databases attempt to solve this problem by providing an object-oriented language (sometimes as extensions to SQL) that programmers can use as alternative to purely relational SQL. On the programming side, libraries known as object–relational mappings (ORMs) attempt to solve the same problem.

2000s, NoSQL and NewSQL
XML databases are a type of structured document-oriented database that allows querying based on XML document attributes. XML databases are mostly used in applications where the data is conveniently viewed as a collection of documents, with a structure that can vary from the very flexible to the highly rigid: examples include scientific articles, patents, tax filings, and personnel records.

NoSQL databases are often very fast, do not require fixed table schemas, avoid join operations by storing denormalized data, and are designed to scale horizontally.

In recent years, there has been a strong demand for massively distributed databases with high partition tolerance, but according to the CAP theorem, it is impossible for a distributed system to simultaneously provide consistency, availability, and partition tolerance guarantees. A distributed system can satisfy any two of these guarantees at the same time, but not all three. For that reason, many NoSQL databases are using what is called eventual consistency to provide both availability and partition tolerance guarantees with a reduced level of data consistency.

NewSQL is a class of modern relational databases that aims to provide the same scalable performance of NoSQL systems for online transaction processing (read-write) workloads while still using SQL and maintaining the ACID guarantees of a traditional database system.

Use cases
Databases are used to support internal operations of organizations and to underpin online interactions with customers and suppliers (see Enterprise software).

Databases are used to hold administrative information and more specialized data, such as engineering data or economic models. Examples include computerized library systems, flight reservation systems, computerized parts inventory systems, and many content management systems that store websites as collections of webpages in a database.

Classification
One way to classify databases involves the type of their contents, for example: bibliographic, document-text, statistical, or multimedia objects. Another way is by their application area, for example: accounting, music compositions, movies, banking, manufacturing, or insurance. A third way is by some technical aspect, such as the database structure or interface type. This section lists a few of the adjectives used to characterize different kinds of databases.

 * An in-memory database is a database that primarily resides in main memory, but is typically backed-up by non-volatile computer data storage. Main memory databases are faster than disk databases, and so are often used where response time is critical, such as in telecommunications network equipment.
 * An active database includes an event-driven architecture which can respond to conditions both inside and outside the database. Possible uses include security monitoring, alerting, statistics gathering and authorization. Many databases provide active database features in the form of database triggers.
 * A cloud database relies on cloud technology. Both the database and most of its DBMS reside remotely, "in the cloud", while its applications are both developed by programmers and later maintained and used by end-users through a web browser and Open APIs.
 * Data warehouses archive data from operational databases and often from external sources such as market research firms. The warehouse becomes the central source of data for use by managers and other end-users who may not have access to operational data. For example, sales data might be aggregated to weekly totals and converted from internal product codes to use UPCs so that they can be compared with ACNielsen data. Some basic and essential components of data warehousing include extracting, analyzing, and mining data, transforming, loading, and managing data so as to make them available for further use.
 * A deductive database combines logic programming with a relational database.
 * A distributed database is one in which both the data and the DBMS span multiple computers.
 * A document-oriented database is designed for storing, retrieving, and managing document-oriented, or semi structured, information. Document-oriented databases are one of the main categories of NoSQL databases.
 * An embedded database system is a DBMS which is tightly integrated with an application software that requires access to stored data in such a way that the DBMS is hidden from the application's end-users and requires little or no ongoing maintenance.
 * End-user databases consist of data developed by individual end-users. Examples of these are collections of documents, spreadsheets, presentations, multimedia, and other files. Several products exist to support such databases.
 * A federated database system comprises several distinct databases, each with its own DBMS. It is handled as a single database by a federated database management system (FDBMS), which transparently integrates multiple autonomous DBMSs, possibly of different types (in which case it would also be a heterogeneous database system), and provides them with an integrated conceptual view.
 * Sometimes the term multi-database is used as a synonym for federated database, though it may refer to a less integrated (e.g., without an FDBMS and a managed integrated schema) group of databases that cooperate in a single application. In this case, typically middleware is used for distribution, which typically includes an atomic commit protocol (ACP), e.g., the two-phase commit protocol, to allow distributed (global) transactions across the participating databases.
 * A graph database is a kind of NoSQL database that uses graph structures with nodes, edges, and properties to represent and store information. General graph databases that can store any graph are distinct from specialized graph databases such as triplestores and network databases.
 * An array DBMS is a kind of NoSQL DBMS that allows modeling, storage, and retrieval of (usually large) multi-dimensional arrays such as satellite images and climate simulation output.
 * In a hypertext or hypermedia database, any word or a piece of text representing an object, e.g., another piece of text, an article, a picture, or a film, can be hyperlinked to that object. Hypertext databases are particularly useful for organizing large amounts of disparate information. For example, they are useful for organizing online encyclopedias, where users can conveniently jump around the text. The World Wide Web is thus a large distributed hypertext database.
 * A knowledge base (abbreviated KB, kb or Δ ) is a special kind of database for knowledge management, providing the means for the computerized collection, organization, and retrieval of knowledge. Also a collection of data representing problems with their solutions and related experiences.

 * A mobile database can be carried on or synchronized from a mobile computing device.
 * Operational databases store detailed data about the operations of an organization. They typically process relatively high volumes of updates using transactions. Examples include customer databases that record contact, credit, and demographic information about a business's customers, personnel databases that hold information such as salary, benefits, skills data about employees, enterprise resource planning systems that record details about product components, parts inventory, and financial databases that keep track of the organization's money, accounting and financial dealings.
 * A parallel database seeks to improve performance through parallelization for tasks such as loading data, building indexes and evaluating queries.

 * The major parallel DBMS architectures which are induced by the underlying hardware architecture are:
 * Shared memory architecture, where multiple processors share the main memory space, as well as other data storage.
 * Shared disk architecture, where each processing unit (typically consisting of multiple processors) has its own main memory, but all units share the other storage.
 * Shared-nothing architecture, where each processing unit has its own main memory and other storage.

 * Probabilistic databases employ fuzzy logic to draw inferences from imprecise data.
 * Real-time databases process transactions fast enough for the result to come back and be acted on right away.
 * A spatial database can store the data with multidimensional features. The queries on such data include location-based queries, like "Where is the closest hotel in my area?".
 * A temporal database has built-in time aspects, for example a temporal data model and a temporal version of SQL. More specifically the temporal aspects usually include valid-time and transaction-time.
 * A terminology-oriented database builds upon an object-oriented database, often customized for a specific field.
 * An unstructured data database is intended to store in a manageable and protected way diverse objects that do not fit naturally and conveniently in common databases. It may include email messages, documents, journals, multimedia objects, etc. The name may be misleading since some objects can be highly structured. However, the entire possible object collection does not fit into a predefined structured framework. Most established DBMSs now support unstructured data in various ways, and new dedicated DBMSs are emerging.

Database management system
Connolly and Begg define database management system (DBMS) as a "software system that enables users to define, create, maintain and control access to the database." Examples of DBMS's include MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, Oracle Database, and Microsoft Access.

The DBMS acronym is sometimes extended to indicate the underlying database model, with RDBMS for the relational, OODBMS for the object (oriented) and ORDBMS for the object–relational model. Other extensions can indicate some other characteristics, such as DDBMS for a distributed database management systems.

The functionality provided by a DBMS can vary enormously. The core functionality is the storage, retrieval and update of data. Codd proposed the following functions and services a fully-fledged general purpose DBMS should provide:

 * Data storage, retrieval and update
 * User accessible catalog or data dictionary describing the metadata
 * Support for transactions and concurrency
 * Facilities for recovering the database should it become damaged
 * Support for authorization of access and update of data
 * Access support from remote locations
 * Enforcing constraints to ensure data in the database abides by certain rules

It is also generally to be expected the DBMS will provide a set of utilities for such purposes as may be necessary to administer the database effectively, including import, export, monitoring, defragmentation and analysis utilities. The core part of the DBMS interacting between the database and the application interface sometimes referred to as the database engine.

Often DBMSs will have configuration parameters that can be statically and dynamically tuned, for example the maximum amount of main memory on a server the database can use. The trend is to minimize the amount of manual configuration, and for cases such as embedded databases the need to target zero-administration is paramount.

The large major enterprise DBMSs have tended to increase in size and functionality and have involved up to thousands of human years of development effort throughout their lifetime.

Early multi-user DBMS typically only allowed for the application to reside on the same computer with access via terminals or terminal emulation software. The client–server architecture was a development where the application resided on a client desktop and the database on a server allowing the processing to be distributed. This evolved into a multitier architecture incorporating application servers and web servers with the end user interface via a web browser with the database only directly connected to the adjacent tier.

A general-purpose DBMS will provide public application programming interfaces (API) and optionally a processor for database languages such as SQL to allow applications to be written to interact with and manipulate the database. A special purpose DBMS may use a private API and be specifically customized and linked to a single application. For example, an email system performs many of the functions of a general-purpose DBMS such as message insertion, message deletion, attachment handling, blocklist lookup, associating messages an email address and so forth however these functions are limited to what is required to handle email.

Application
External interaction with the database will be via an application program that interfaces with the DBMS. This can range from a database tool that allows users to execute SQL queries textually or graphically, to a website that happens to use a database to store and search information.

Application program interface
A programmer will code interactions to the database (sometimes referred to as a datasource) via an application program interface (API) or via a database language. The particular API or language chosen will need to be supported by DBMS, possibly indirectly via a preprocessor or a bridging API. Some API's aim to be database independent, ODBC being a commonly known example. Other common API's include JDBC and ADO.NET.

Database languages
Database languages are special-purpose languages, which allow one or more of the following tasks, sometimes distinguished as sublanguages:

 * Data control language (DCL) – controls access to data;
 * Data definition language (DDL) – defines data types such as creating, altering, or dropping tables and the relationships among them;
 * Data manipulation language (DML) – performs tasks such as inserting, updating, or deleting data occurrences;
 * Data query language (DQL) – allows searching for information and computing derived information.

Database languages are specific to a particular data model. Notable examples include:

 * SQL combines the roles of data definition, data manipulation, and query in a single language. It was one of the first commercial languages for the relational model, although it departs in some respects from the relational model as described by Codd (for example, the rows and columns of a table can be ordered). SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987. The standards have been regularly enhanced since and are supported (with varying degrees of conformance) by all mainstream commercial relational DBMSs.
 * OQL is an object model language standard (from the Object Data Management Group). It has influenced the design of some of the newer query languages like JDOQL and EJB QL.
 * XQuery is a standard XML query language implemented by XML database systems such as MarkLogic and eXist, by relational databases with XML capability such as Oracle and Db2, and also by in-memory XML processors such as Saxon.
 * SQL/XML combines XQuery with SQL.

A database language may also incorporate features like:

 * DBMS-specific configuration and storage engine management
 * Computations to modify query results, like counting, summing, averaging, sorting, grouping, and cross-referencing
 * Constraint enforcement (e.g. in an automotive database, only allowing one engine type per car)
 * Application programming interface version of the query language, for programmer convenience

Storage
Database storage is the container of the physical materialization of a database. It comprises the internal (physical) level in the database architecture. It also contains all the information needed (e.g., metadata, "data about the data", and internal data structures) to reconstruct the conceptual level and external level from the internal level when needed. Databases as digital objects contain three layers of information which must be stored: the data, the structure, and the semantics. Proper storage of all three layers is needed for future preservation and longevity of the database. Putting data into permanent storage is generally the responsibility of the database engine a.k.a. "storage engine". Though typically accessed by a DBMS through the underlying operating system (and often using the operating systems' file systems as intermediates for storage layout), storage properties and configuration settings are extremely important for the efficient operation of the DBMS, and thus are closely maintained by database administrators. A DBMS, while in operation, always has its database residing in several types of storage (e.g., memory and external storage). The database data and the additional needed information, possibly in very large amounts, are coded into bits. Data typically reside in the storage in structures that look completely different from the way the data look at the conceptual and external levels, but in ways that attempt to optimize (the best possible) these levels' reconstruction when needed by users and programs, as well as for computing additional types of needed information from the data (e.g., when querying the database).

Some DBMSs support specifying which character encoding was used to store data, so multiple encodings can be used in the same database.

Various low-level database storage structures are used by the storage engine to serialize the data model so it can be written to the medium of choice. Techniques such as indexing may be used to improve performance. Conventional storage is row-oriented, but there are also column-oriented and correlation databases.

Materialized views
Often storage redundancy is employed to increase performance. A common example is storing materialized views, which consist of frequently needed external views or query results. Storing such views saves the expensive computing them each time they are needed. The downsides of materialized views are the overhead incurred when updating them to keep them synchronized with their original updated database data, and the cost of storage redundancy.

Replication
Occasionally a database employs storage redundancy by database objects replication (with one or more copies) to increase data availability (both to improve performance of simultaneous multiple end-user accesses to the same database object, and to provide resiliency in a case of partial failure of a distributed database). Updates of a replicated object need to be synchronized across the object copies. In many cases, the entire database is replicated.

Virtualization
With data virtualization, the data used remains in its original locations and real-time access is established to allow analytics across multiple sources. This can aid in resolving some technical difficulties such as compatibility problems when combining data from various platforms, lowering the risk of error caused by faulty data, and guaranteeing that the newest data is used. Furthermore, avoiding the creation of a new database containing personal information can make it easier to comply with privacy regulations. However, with data virtualization, the connection to all necessary data sources must be operational as there is no local copy of the data, which is one of the main drawbacks of the approach.

Security
Database security deals with all various aspects of protecting the database content, its owners, and its users. It ranges from protection from intentional unauthorized database uses to unintentional database accesses by unauthorized entities (e.g., a person or a computer program).

Database access control deals with controlling who (a person or a certain computer program) are allowed to access what information in the database. The information may comprise specific database objects (e.g., record types, specific records, data structures), certain computations over certain objects (e.g., query types, or specific queries), or using specific access paths to the former (e.g., using specific indexes or other data structures to access information). Database access controls are set by special authorized (by the database owner) personnel that uses dedicated protected security DBMS interfaces.

This may be managed directly on an individual basis, or by the assignment of individuals and privileges to groups, or (in the most elaborate models) through the assignment of individuals and groups to roles which are then granted entitlements. Data security prevents unauthorized users from viewing or updating the database. Using passwords, users are allowed access to the entire database or subsets of it called "subschemas". For example, an employee database can contain all the data about an individual employee, but one group of users may be authorized to view only payroll data, while others are allowed access to only work history and medical data. If the DBMS provides a way to interactively enter and update the database, as well as interrogate it, this capability allows for managing personal databases.

Data security in general deals with protecting specific chunks of data, both physically (i.e., from corruption, or destruction, or removal; e.g., see physical security), or the interpretation of them, or parts of them to meaningful information (e.g., by looking at the strings of bits that they comprise, concluding specific valid credit-card numbers; e.g., see data encryption).

Change and access logging records who accessed which attributes, what was changed, and when it was changed. Logging services allow for a forensic database audit later by keeping a record of access occurrences and changes. Sometimes application-level code is used to record changes rather than leaving this in the database. Monitoring can be set up to attempt to detect security breaches. Therefore, organizations must take database security seriously because of the many benefits it provides. Organizations will be safeguarded from security breaches and hacking activities like firewall intrusion, virus spread, and ransom ware. This helps in protecting the company's essential information, which cannot be shared with outsiders at any cause.

Transactions and concurrency
Database transactions can be used to introduce some level of fault tolerance and data integrity after recovery from a crash. A database transaction is a unit of work, typically encapsulating a number of operations over a database (e.g., reading a database object, writing, acquiring or releasing a lock, etc.), an abstraction supported in database and also other systems. Each transaction has well defined boundaries in terms of which program/code executions are included in that transaction (determined by the transaction's programmer via special transaction commands).

The acronym ACID describes some ideal properties of a database transaction: atomicity, consistency, isolation, and durability.

Migration
A database built with one DBMS is not portable to another DBMS (i.e., the other DBMS cannot run it). However, in some situations, it is desirable to migrate a database from one DBMS to another. The reasons are primarily economical (different DBMSs may have different total costs of ownership or TCOs), functional, and operational (different DBMSs may have different capabilities). The migration involves the database's transformation from one DBMS type to another. The transformation should maintain (if possible) the database related application (i.e., all related application programs) intact. Thus, the database's conceptual and external architectural levels should be maintained in the transformation. It may be desired that also some aspects of the architecture internal level are maintained. A complex or large database migration may be a complicated and costly (one-time) project by itself, which should be factored into the decision to migrate. This is in spite of the fact that tools may exist to help migration between specific DBMSs. Typically, a DBMS vendor provides tools to help import databases from other popular DBMSs.

Building, maintaining, and tuning
After designing a database for an application, the next stage is building the database. Typically, an appropriate general-purpose DBMS can be selected to be used for this purpose. A DBMS provides the needed user interfaces to be used by database administrators to define the needed application's data structures within the DBMS's respective data model. Other user interfaces are used to select needed DBMS parameters (like security related, storage allocation parameters, etc.).

When the database is ready (all its data structures and other needed components are defined), it is typically populated with initial application's data (database initialization, which is typically a distinct project; in many cases using specialized DBMS interfaces that support bulk insertion) before making it operational. In some cases, the database becomes operational while empty of application data, and data are accumulated during its operation.

After the database is created, initialized and populated it needs to be maintained. Various database parameters may need changing and the database may need to be tuned (tuning) for better performance; application's data structures may be changed or added, new related application programs may be written to add to the application's functionality, etc.

Backup and restore
Sometimes it is desired to bring a database back to a previous state (for many reasons, e.g., cases when the database is found corrupted due to a software error, or if it has been updated with erroneous data). To achieve this, a backup operation is done occasionally or continuously, where each desired database state (i.e., the values of its data and their embedding in database's data structures) is kept within dedicated backup files (many techniques exist to do this effectively). When it is decided by a database administrator to bring the database back to this state (e.g., by specifying this state by a desired point in time when the database was in this state), these files are used to restore that state.

Static analysis
Static analysis techniques for software verification can be applied also in the scenario of query languages. In particular, the *Abstract interpretation framework has been extended to the field of query languages for relational databases as a way to support sound approximation techniques. The semantics of query languages can be tuned according to suitable abstractions of the concrete domain of data. The abstraction of relational database systems has many interesting applications, in particular, for security purposes, such as fine-grained access control, watermarking, etc.

Miscellaneous features
Other DBMS features might include:

 * Database logs – This helps in keeping a history of the executed functions.
 * Graphics component for producing graphs and charts, especially in a data warehouse system.
 * Query optimizer – Performs query optimization on every query to choose an efficient query plan (a partial order (tree) of operations) to be executed to compute the query result. May be specific to a particular storage engine.
 * Tools or hooks for database design, application programming, application program maintenance, database performance analysis and monitoring, database configuration monitoring, DBMS hardware configuration (a DBMS and related database may span computers, networks, and storage units) and related database mapping (especially for a distributed DBMS), storage allocation and database layout monitoring, storage migration, etc.

Increasingly, there are calls for a single system that incorporates all of these core functionalities into the same build, test, and deployment framework for database management and source control. Borrowing from other developments in the software industry, some market such offerings as "DevOps for database".

Design and modeling
The first task of a database designer is to produce a conceptual data model that reflects the structure of the information to be held in the database. A common approach to this is to develop an entity–relationship model, often with the aid of drawing tools. Another popular approach is the Unified Modeling Language. A successful data model will accurately reflect the possible state of the external world being modeled: for example, if people can have more than one phone number, it will allow this information to be captured. Designing a good conceptual data model requires a good understanding of the application domain; it typically involves asking deep questions about the things of interest to an organization, like "can a customer also be a supplier?", or "if a product is sold with two different forms of packaging, are those the same product or different products?", or "if a plane flies from New York to Dubai via Frankfurt, is that one flight or two (or maybe even three)?". The answers to these questions establish definitions of the terminology used for entities (customers, products, flights, flight segments) and their relationships and attributes.

Producing the conceptual data model sometimes involves input from business processes, or the analysis of workflow in the organization. This can help to establish what information is needed in the database, and what can be left out. For example, it can help when deciding whether the database needs to hold historic data as well as current data.

Having produced a conceptual data model that users are happy with, the next stage is to translate this into a schema that implements the relevant data structures within the database. This process is often called logical database design, and the output is a logical data model expressed in the form of a schema. Whereas the conceptual data model is (in theory at least) independent of the choice of database technology, the logical data model will be expressed in terms of a particular database model supported by the chosen DBMS. (The terms data model and database model are often used interchangeably, but in this article we use data model for the design of a specific database, and database model for the modeling notation used to express that design).

The most popular database model for general-purpose databases is the relational model, or more precisely, the relational model as represented by the SQL language. The process of creating a logical database design using this model uses a methodical approach known as normalization. The goal of normalization is to ensure that each elementary "fact" is only recorded in one place, so that insertions, updates, and deletions automatically maintain consistency.

The final stage of database design is to make the decisions that affect performance, scalability, recovery, security, and the like, which depend on the particular DBMS. This is often called physical database design, and the output is the physical data model. A key goal during this stage is data independence, meaning that the decisions made for performance optimization purposes should be invisible to end-users and applications. There are two types of data independence: Physical data independence and logical data independence. Physical design is driven mainly by performance requirements, and requires a good knowledge of the expected workload and access patterns, and a deep understanding of the features offered by the chosen DBMS.

Another aspect of physical database design is security. It involves both defining access control to database objects as well as defining security levels and methods for the data itself.

Models

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. The most popular example of a database model is the relational model (or the SQL approximation of relational), which uses a table-based format.

Common logical data models for databases include:
 * Navigational databases
 * Hierarchical database model
 * Network model
 * Graph database
 * Relational model
 * Entity–relationship model
 * Enhanced entity–relationship model
 * Object model
 * Document model
 * Entity–attribute–value model
 * Star schema

An object–relational database combines the two related structures.

Physical data models include:
 * Inverted index
 * Flat file

Other models include:
 * Multidimensional model
 * Array model
 * Multivalue model

Specialized models are optimized for particular types of data:
 * XML database
 * Semantic model
 * Content store
 * Event store
 * Time series model

External, conceptual, and internal views

A database management system provides three views of the database data:

 * The external level defines how each group of end-users sees the organization of data in the database. A single database can have any number of views at the external level.
 * The conceptual level (or logical level) unifies the various external views into a compatible global view. It provides the synthesis of all the external views. It is out of the scope of the various database end-users, and is rather of interest to database application developers and database administrators.
 * The internal level (or physical level) is the internal organization of data inside a DBMS. It is concerned with cost, performance, scalability and other operational matters. It deals with storage layout of the data, using storage structures such as indexes to enhance performance. Occasionally it stores data of individual views (materialized views), computed from generic data, if performance justification exists for such redundancy. It balances all the external views' performance requirements, possibly conflicting, in an attempt to optimize overall performance across all activities.

While there is typically only one conceptual and internal view of the data, there can be any number of different external views. This allows users to see database information in a more business-related way rather than from a technical, processing viewpoint. For example, a financial department of a company needs the payment details of all employees as part of the company's expenses, but does not need details about employees that are in the interest of the human resources department. Thus different departments need different views of the company's database.

The three-level database architecture relates to the concept of data independence which was one of the major initial driving forces of the relational model. The idea is that changes made at a certain level do not affect the view at a higher level. For example, changes in the internal level do not affect application programs written using conceptual level interfaces, which reduces the impact of making physical changes to improve performance.

The conceptual view provides a level of indirection between internal and external. On the one hand it provides a common view of the database, independent of different external view structures, and on the other hand it abstracts away details of how the data are stored or managed (internal level). In principle every level, and even every external view, can be presented by a different data model. In practice usually a given DBMS uses the same data model for both the external and the conceptual levels (e.g., relational model). The internal level, which is hidden inside the DBMS and depends on its implementation, requires a different level of detail and uses its own types of data structure types.

Research
Database technology has been an active research topic since the 1960s, both in academia and in the research and development groups of companies (for example IBM Research). Research activity includes theory and development of prototypes. Notable research topics have included models, the atomic transaction concept, related concurrency control techniques, query languages and query optimization methods, RAID, and more.

The database research area has several dedicated academic journals (for example, ACM Transactions on Database Systems-TODS, Data and Knowledge Engineering-DKE) and annual conferences (e.g., ACM SIGMOD, ACM PODS, VLDB, IEEE ICDE).

title: Database


text:
Dipole

In physics, a dipole   is an electromagnetic phenomenon which occurs in two ways:
 * An electric dipole deals with the separation of the positive and negative electric charges found in any electromagnetic system. A simple example of this system is a pair of charges of equal magnitude but opposite sign separated by some typically small distance. (A permanent electric dipole is called an electret.)
 * A magnetic dipole is the closed circulation of an electric current system. A simple example is a single loop of wire with constant current through it. A bar magnet is an example of a magnet with a permanent magnetic dipole moment.

Dipoles, whether electric or magnetic, can be characterized by their dipole moment, a vector quantity. For the simple electric dipole, the electric dipole moment points from the negative charge towards the positive charge, and has a magnitude equal to the strength of each charge times the separation between the charges. (To be precise: for the definition of the dipole moment, one should always consider the "dipole limit", where, for example, the distance of the generating charges should converge to 0 while simultaneously, the charge strength should diverge to infinity in such a way that the product remains a positive constant.)

For the magnetic (dipole) current loop, the magnetic dipole moment points through the loop (according to the right hand grip rule), with a magnitude equal to the current in the loop times the area of the loop.

Similar to magnetic current loops, the electron particle and some other fundamental particles have magnetic dipole moments, as an electron generates a magnetic field identical to that generated by a very small current loop. However, an electron's magnetic dipole moment is not due to a current loop, but to an intrinsic property of the electron. The electron may also have an electric dipole moment though such has yet to be observed (see electron electric dipole moment).

A permanent magnet, such as a bar magnet, owes its magnetism to the intrinsic magnetic dipole moment of the electron. The two ends of a bar magnet are referred to as poles (not to be confused with monopoles, see Classification below) and may be labeled "north" and "south". In terms of the Earth's magnetic field, they are respectively "north-seeking" and "south-seeking" poles: if the magnet were freely suspended in the Earth's magnetic field, the north-seeking pole would point towards the north and the south-seeking pole would point towards the south. The dipole moment of the bar magnet points from its magnetic south to its magnetic north pole. In a magnetic compass, the north pole of a bar magnet points north. However, that means that Earth's geomagnetic north pole is the south pole (south-seeking pole) of its dipole moment and vice versa.

The only known mechanisms for the creation of magnetic dipoles are by current loops or quantum-mechanical spin since the existence of magnetic monopoles has never been experimentally demonstrated.

Classification

A physical dipole consists of two equal and opposite point charges: in the literal sense, two poles. Its field at large distances (i.e., distances large in comparison to the separation of the poles) depends almost entirely on the dipole moment as defined above. A point (electric) dipole is the limit obtained by letting the separation tend to 0 while keeping the dipole moment fixed. The field of a point dipole has a particularly simple form, and the order-1 term in the multipole expansion is precisely the point dipole field.

Although there are no known magnetic monopoles in nature, there are magnetic dipoles in the form of the quantum-mechanical spin associated with particles such as electrons (although the accurate description of such effects falls outside of classical electromagnetism). A theoretical magnetic point dipole has a magnetic field of exactly the same form as the electric field of an electric point dipole. A very small current-carrying loop is approximately a magnetic point dipole; the magnetic dipole moment of such a loop is the product of the current flowing in the loop and the (vector) area of the loop.

Any configuration of charges or currents has a 'dipole moment', which describes the dipole whose field is the best approximation, at large distances, to that of the given configuration. This is simply one term in the multipole expansion when the total charge ("monopole moment") is 0—as it always is for the magnetic case, since there are no magnetic monopoles. The dipole term is the dominant one at large distances: Its field falls off in proportion to $1⁄r^{3}$, as compared to $1⁄r^{4}$ for the next (quadrupole) term and higher powers of $1⁄r$ for higher terms, or $1⁄r^{2}$ for the monopole term.

Molecular dipoles
Many molecules have such dipole moments due to non-uniform distributions of positive and negative charges on the various atoms. Such is the case with polar compounds like hydrogen fluoride (HF), where electron density is shared unequally between atoms. Therefore, a molecule's dipole is an electric dipole with an inherent electric field that should not be confused with a magnetic dipole, which generates a magnetic field.

The physical chemist Peter J. W. Debye was the first scientist to study molecular dipoles extensively, and, as a consequence, dipole moments are measured in the non-SI unit named debye in his honor.

For molecules there are three types of dipoles:
 * Permanent dipoles: These occur when two atoms in a molecule have substantially different electronegativity: One atom attracts electrons more than another, becoming more negative, while the other atom becomes more positive. A molecule with a permanent dipole moment is called a polar molecule. See dipole–dipole attractions.
 * Instantaneous dipoles:These occur due to chance when electrons happen to be more concentrated in one place than another in a molecule, creating a temporary dipole. These dipoles are smaller in magnitude than permanent dipoles, but still play a large role in chemistry and biochemistry due to their prevalence. See instantaneous dipole.
 * Induced dipoles: These can occur when one molecule with a permanent dipole repels another molecule's electrons, inducing a dipole moment in that molecule. A molecule is polarized when it carries an induced dipole. See induced-dipole attraction.

More generally, an induced dipole of any polarizable charge distribution ρ (remember that a molecule has a charge distribution) is caused by an electric field external to ρ. This field may, for instance, originate from an ion or polar molecule in the vicinity of ρ or may be macroscopic (e.g., a molecule between the plates of a charged capacitor). The size of the induced dipole moment is equal to the product of the strength of the external field and the dipole polarizability of ρ.

Dipole moment values can be obtained from measurement of the dielectric constant. Some typical gas phase values in debye units are:

 * carbon dioxide: 0
 * carbon monoxide: 0.112 D
 * ozone: 0.53 D
 * phosgene: 1.17 D
 * ammonia: 1.42 D
 * water vapor: 1.85 D
 * hydrogen cyanide: 2.98 D
 * cyanamide: 4.27 D
 * potassium bromide: 10.41 D

Potassium bromide (KBr) has one of the highest dipole moments because it is an ionic compound that exists as a molecule in the gas phase.

The overall dipole moment of a molecule may be approximated as a vector sum of bond dipole moments. As a vector sum it depends on the relative orientation of the bonds, so that from the dipole moment information can be deduced about the molecular geometry.

For example, the zero dipole of CO2 implies that the two C=O bond dipole moments cancel so that the molecule must be linear. For H2O the O−H bond moments do not cancel because the molecule is bent. For ozone (O3) which is also a bent molecule, the bond dipole moments are not zero even though the O−O bonds are between similar atoms. This agrees with the Lewis structures for the resonance forms of ozone which show a positive charge on the central oxygen atom.

An example in organic chemistry of the role of geometry in determining dipole moment is the cis and trans isomers of 1,2-dichloroethene. In the cis isomer the two polar C−Cl bonds are on the same side of the C=C double bond and the molecular dipole moment is 1.90 D. In the trans isomer, the dipole moment is zero because the two C−Cl bonds are on opposite sides of the C=C and cancel (and the two bond moments for the much less polar C−H bonds also cancel).

Another example of the role of molecular geometry is boron trifluoride, which has three polar bonds with a difference in electronegativity greater than the traditionally cited threshold of 1.7 for ionic bonding. However, due to the equilateral triangular distribution of the fluoride ions centered on and in the same plane as the boron cation, the symmetry of the molecule results in its dipole moment being zero.

Quantum mechanical dipole operator
Consider a collection of N particles with charges qi and position vectors ri. For instance, this collection may be a molecule consisting of electrons, all with charge −e, and nuclei with charge eZi, where Zi is the atomic number of the i th nucleus. The dipole observable (physical quantity) has the quantum mechanical dipole operator:
 * $$\mathfrak{p} = \sum_{i=1}^N \, q_i \, \mathbf{r}_i \, .$$

Notice that this definition is valid only for neutral atoms or molecules, i.e. total charge equal to zero. In the ionized case, we have
 * $$\mathfrak{p} = \sum_{i=1}^N \, q_i \, (\mathbf{r}_i - \mathbf{r}_c) ,$$

where $$ \mathbf{r}_c$$ is the center of mass of the molecule/group of particles.

Atomic dipoles
A non-degenerate (S-state) atom can have only a zero permanent dipole. This fact follows quantum mechanically from the inversion symmetry of atoms. All 3 components of the dipole operator are antisymmetric under inversion with respect to the nucleus,
 * $$ \mathfrak{I} \;\mathfrak{p}\; \mathfrak{I}^{-1} = -\mathfrak{p}, $$

where $$\mathfrak{p}$$ is the dipole operator and $$\mathfrak{I}$$ is the inversion operator.

The permanent dipole moment of an atom in a non-degenerate state (see degenerate energy level) is given as the expectation (average) value of the dipole operator,
 * $$\left\langle \mathfrak{p} \right\rangle = \left\langle\, S\, | \mathfrak{p} |\, S \,\right\rangle,$$

where $$ |\, S\, \rangle $$ is an S-state, non-degenerate, wavefunction, which is symmetric or antisymmetric under inversion: $$ \mathfrak{I}\, |\, S\, \rangle = \pm|\, S\, \rangle$$. Since the product of the wavefunction (in the ket) and its complex conjugate (in the bra) is always symmetric under inversion and its inverse,

\left\langle \mathfrak{p} \right\rangle = \left\langle\, \mathfrak{I}^{-1}\, S\, | \mathfrak{p} |\, \mathfrak{I}^{-1}\, S\, \right\rangle = \left\langle\, S\, | \mathfrak{I}\, \mathfrak{p}\, \mathfrak{I}^{-1} |\, S\, \right\rangle = -\left\langle \mathfrak{p} \right\rangle $$

it follows that the expectation value changes sign under inversion. We used here the fact that $$ \mathfrak{I}$$, being a symmetry operator, is unitary: $$ \mathfrak{I}^{-1} = \mathfrak{I}^{*}\,$$ and by definition the Hermitian adjoint $$ \mathfrak{I}^*\,$$ may be moved from bra to ket and then becomes $$ \mathfrak{I}^{**} = \mathfrak{I}\,$$. Since the only quantity that is equal to minus itself is the zero, the expectation value vanishes,
 * $$\left\langle \mathfrak{p} \right\rangle = 0.$$

In the case of open-shell atoms with degenerate energy levels, one could define a dipole moment by the aid of the first-order Stark effect. This gives a non-vanishing dipole (by definition proportional to a non-vanishing first-order Stark shift) only if some of the wavefunctions belonging to the degenerate energies have opposite parity; i.e., have different behavior under inversion. This is a rare occurrence, but happens for the excited H-atom, where 2s and 2p states are "accidentally" degenerate (see article Laplace–Runge–Lenz vector for the origin of this degeneracy) and have opposite parity (2s is even and 2p is odd).

Magnitude
The far-field strength, B, of a dipole magnetic field is given by

 * $$B(m, r, \lambda) = \frac{\mu_0}{4\pi} \frac{m}{r^3} \sqrt{1 + 3\sin^2(\lambda)} \, ,$$

where
 * B is the strength of the field, measured in teslas
 * r is the distance from the center, measured in metres
 * λ is the magnetic latitude (equal to 90° − θ) where θ is the magnetic colatitude, measured in radians or degrees from the dipole axis
 * m is the dipole moment, measured in ampere-square metres or joules per tesla
 * μ0 is the permeability of free space, measured in henries per metre.

Conversion to cylindrical coordinates is achieved using and
 * $$\lambda = \arcsin\left(\frac{z}{\sqrt{z^2 + \rho^2}}\right)$$

where ρ is the perpendicular distance from the z-axis. Then,
 * $$B(\rho, z) = \frac{\mu_0 m}{4 \pi \left(z^2 + \rho^2\right)^\frac32} \sqrt{1 + \frac{3 z^2}{z^2 + \rho^2}}$$

Vector form
The field itself is a vector quantity:

 * $$\mathbf{B}(\mathbf{m}, \mathbf{r}) =

\frac{\mu_0}{4\pi} \ \frac{3(\mathbf{m} \cdot \hat{\mathbf{r}}) \hat{\mathbf{r}} - \mathbf{m}}{r^3} $$

where

 * B is the field
 * r is the vector from the position of the dipole to the position where the field is being measured
 * r is the absolute value of r: the distance from the dipole
 * r̂ = $r⁄r$ is the unit vector parallel to r;
 * m is the (vector) dipole moment
 * μ0 is the permeability of free space

This is exactly the field of a point dipole, exactly the dipole term in the multipole expansion of an arbitrary field, and approximately the field of any dipole-like configuration at large distances.

Magnetic vector potential
The vector potential A of a magnetic dipole is
 * $$\mathbf{A}(\mathbf{r}) = \frac{\mu_0}{4\pi} \frac{\mathbf{m} \times \hat{\mathbf{r}}}{r^2}$$

with the same definitions as above.

Field from an electric dipole
The electrostatic potential at position r due to an electric dipole at the origin is given by:

 * $$ \Phi(\mathbf{r}) = \frac{1}{4\pi\epsilon_0}\,\frac{\mathbf{p}\cdot\hat{\mathbf{r}}}{r^2}$$

where p is the (vector) dipole moment, and є0 is the permittivity of free space.

This term appears as the second term in the multipole expansion of an arbitrary electrostatic potential Φ(r). If the source of Φ(r) is a dipole, as it is assumed here, this term is the only non-vanishing term in the multipole expansion of Φ(r). The electric field from a dipole can be found from the gradient of this potential:

 * $$ \mathbf{E} = - \nabla \Phi =\frac {1} {4\pi\epsilon_0} \ \frac{3(\mathbf{p}\cdot\hat{\mathbf{r}})\hat{\mathbf{r}}-\mathbf{p}}{r^3} - \delta^3(\mathbf{r})\frac{\mathbf{p}}{3\epsilon_0}.$$

This is of the same form of the expression for the magnetic field of a point magnetic dipole, ignoring the delta function. In a real electric dipole, however, the charges are physically separate and the electric field diverges or converges at the point charges. This is different to the magnetic field of a real magnetic dipole which is continuous everywhere. The delta function represents the strong field pointing in the opposite direction between the point charges, which is often omitted since one is rarely interested in the field at the dipole's position. For further discussions about the internal field of dipoles, see or Magnetic moment.

Torque on a dipole
Since the direction of an electric field is defined as the direction of the force on a positive charge, electric field lines point away from a positive charge and toward a negative charge.

When placed in a homogeneous electric or magnetic field, equal but opposite forces arise on each side of the dipole creating a torque $τ$}:

 * $$ \boldsymbol{\tau} = \mathbf{p} \times \mathbf{E}$$

for an electric dipole moment p (in coulomb-meters), or

 * $$ \boldsymbol{\tau} = \mathbf{m} \times \mathbf{B}$$

for a magnetic dipole moment m (in ampere-square meters).

The resulting torque will tend to align the dipole with the applied field, which in the case of an electric dipole, yields a potential energy of

 * $$ U = -\mathbf{p} \cdot \mathbf{E}$$.

The energy of a magnetic dipole is similarly

 * $$ U = -\mathbf{m} \cdot \mathbf{B}$$.

Dipole radiation

In addition to dipoles in electrostatics, it is also common to consider an electric or magnetic dipole that is oscillating in time. It is an extension, or a more physical next-step, to spherical wave radiation.

In particular, consider a harmonically oscillating electric dipole, with angular frequency ω and a dipole moment p0 along the ẑ direction of the form
 * $$\mathbf{p}(\mathbf{r}, t) = \mathbf{p}(\mathbf{r})e^{-i\omega t} = p_0\hat{\mathbf{z}}e^{-i\omega t} .$$

In vacuum, the exact field produced by this oscillating dipole can be derived using the retarded potential formulation as:

 * $$\begin{align}

\mathbf{E} &= \frac{1}{4\pi\varepsilon_0} \left\{ \frac{\omega^2}{c^2 r} \left( \hat{\mathbf{r}} \times \mathbf{p} \right) \times \hat{\mathbf{r}} + \left( \frac{1}{r^3} - \frac{i\omega}{cr^2} \right) \left( 3\hat{\mathbf{r}} \left[\hat{\mathbf{r}} \cdot \mathbf{p}\right] - \mathbf{p} \right) \right\} e^\frac{i\omega r}{c} e^{-i\omega t} \\ \mathbf{B} &= \frac{\omega^2}{4\pi\varepsilon_0 c^3} (\hat{\mathbf{r}} \times \mathbf{p}) \left( 1 - \frac{c}{i\omega r} \right) \frac{e^{i\omega r/c}}{r} e^{-i\omega t}. \end{align}$$

For $rω⁄c$ ≫ 1, the far-field takes the simpler form of a radiating "spherical" wave, but with angular dependence embedded in the cross-product:

 * $$\begin{align}

\mathbf{B} &= \frac{\omega^2}{4\pi\varepsilon_0 c^3} (\hat{\mathbf{r}} \times \mathbf{p}) \frac{e^{i\omega (r/c - t)}}{r} = \frac{\omega^2 \mu_0 p_0 }{4\pi c} (\hat{\mathbf{r}} \times \hat{\mathbf{z}}) \frac{e^{i\omega (r/c - t)}}{r} = -\frac{\omega^2 \mu_0 p_0 }{4\pi c} \sin(\theta) \frac{e^{i\omega (r/c - t)}}{r} \mathbf{\hat{\phi}} \\ \mathbf{E} &= c \mathbf{B} \times \hat{\mathbf{r}} = -\frac{\omega^2 \mu_0 p_0}{4\pi} \sin(\theta) \left(\hat{\phi} \times \mathbf{\hat{r}}\right) \frac{e^{i\omega (r/c - t)}}{r} = -\frac{\omega^2 \mu_0 p_0}{4\pi} \sin(\theta) \frac{e^{i\omega (r/c - t)}}{r} \hat{\theta}. \end{align}$$

The time-averaged Poynting vector

 * $$\langle \mathbf{S} \rangle = \left(\frac{\mu_0 p_0^2\omega^4}{32\pi^2 c}\right) \frac{\sin^2(\theta)}{r^2} \mathbf{\hat{r}}$$

is not distributed isotropically, but concentrated around the directions lying perpendicular to the dipole moment, as a result of the non-spherical electric and magnetic waves. In fact, the spherical harmonic function (sin θ) responsible for such toroidal angular distribution is precisely the l = 1 "p" wave.

The total time-average power radiated by the field can then be derived from the Poynting vector as

 * $$P = \frac{\mu_0 \omega^4 p_0^2}{12\pi c}.$$

Notice that the dependence of the power on the fourth power of the frequency of the radiation is in accordance with the Rayleigh scattering, and the underlying effects why the sky consists of mainly blue colour.

A circular polarized dipole is described as a superposition of two linear dipoles.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Dipole


text:
Talk:Dipole-dipole bond

If you take upon yourself to delete information, at least rederect the page to relevant information. Preserving information is nice, even if the name is wrong... --Anders Törlind

The information was written by me, and the name change was extremly minimal (dipole-dipole bond changed to dipole-dipole attraction). It is misleading to call it a bond, and an unnesecary addition to an encyclopedia. --sodium

title: Talk:Dipole-dipole bond


text:
Talk:Delocalised

''So, are all electrons in bonding orbitals delocalised, then? This definition doesn't seem right.''

title: Talk:Delocalised


text:
Dynamics

Dynamics (from Greek δυναμικός dynamikos "powerful", from δύναμις dynamis "power") or dynamic may refer to:

Physics and engineering

 * Dynamics (mechanics)
 * Aerodynamics, the study of the motion of air
 * Analytical dynamics, the motion of bodies as induced by external forces
 * Brownian dynamics, the occurrence of Langevin dynamics in the motion of particles in solution
 * File dynamics, stochastic motion of particles in a channel
 * Flight dynamics, the science of aircraft and spacecraft design
 * Fluid dynamics or hydrodynamics, the study of fluid flow
 * Computational fluid dynamics, a way of studying fluid dynamics using numerical methods
 * Fractional dynamics, dynamics with integrations and differentiations of fractional orders
 * Molecular dynamics, the study of motion on the molecular level
 * Langevin dynamics, a mathematical model for stochastic dynamics
 * Orbital dynamics, the study of the motion of rockets and spacecraft
 * Quantum chromodynamics, a theory of the strong interaction (color force)
 * Quantum electrodynamics, a description of how matter and light interact
 * Relativistic dynamics, a combination of relativistic and quantum concepts
 * Stellar dynamics, a description of the collective motion of stars
 * System dynamics, the study of the behavior of complex systems
 * Thermodynamics, the study of the relationships between heat and mechanical energy
 * Vehicle dynamics

Brands and enterprises

 * Dynamic (record label), an Italian record label in Genoa
 * Arrow Dynamics, roller coaster designer
 * Boston Dynamics, robot designer
 * Crystal Dynamics, video game developer
 * General Dynamics, defence contractor
 * Microsoft Dynamics, a line of business software

Computer science and mathematics

 * Dynamical energy analysis, a numerical method modelling structure borne sound and vibration in complex structures
 * Dynamic program analysis, a set of methods for analyzing computer software
 * Dynamic programming, a mathematical optimization method, and a computer programming paradigm

Internet

 * Dynamic HTML, technologies for creating interactive and animated web sites
 * Dynamic IP, an IP address that changes every time the computer is turned on
 * Dynamic web page, a web page with content that varies

Mathematics

 * Dynamical system, a concept describing a point's time dependency
 * Topological dynamics, the study of dynamical systems from the viewpoint of general topology
 * Symbolic dynamics, a method to model dynamical systems

Social science

 * Group dynamics, the study of social group processes especially
 * Population dynamics, in life sciences, the changes in the composition of a population
 * Psychodynamics, the study of psychological forces driving human behavior
 * Social dynamics, the ability of a society to react to changes
 * Spiral Dynamics, a social development theory

Other uses

 * Dynamics (music), the softness or loudness of a sound or note
 * DTA Dynamic, a French ultralight trike wing design
 * Dynamic microphone, a type of microphone
 * Force dynamics, a semantic concept about how entities interact with reference to force
 * Ice-sheet dynamics, the motion within large bodies of ice
 * Neural oscillation in neurodynamics, a rhythmic pattern in the brain
 * Sol Dynamic, a Brazilian paraglider design
 * Dynamics (album)
 * The Dynamics, American R&B group

title: Dynamics


text:
Draught beer

Draught beer, also spelt draft, is beer served from a cask or keg rather than from a bottle or can. Draught beer served from a pressurised keg is also known as keg beer.

Name
Until Joseph Bramah patented the beer engine in 1785, beer was served directly from the barrel and carried to the customer. The Old English  ("carry; pull") developed into a series of related words including drag, draw, and draught. By the time Bramah's beer pumps became popular, the use of the term draught to refer to the acts of serving or drinking beer was well established and transferred easily to beer served via the hand pumps. In time, the word came to be restricted to only such beer. The usual spelling is now "draught" in the United Kingdom, Ireland, Australia, and New Zealand and more commonly "draft" in North America, although it can be spelt either way. Regardless of spelling, the word is pronounced or  depending on the region the speaker is from.

Canned draught is beer served from a pressurised container featuring a widget. Smooth flow (also known as cream flow, nitrokeg, or smooth) is the name brewers give to draught beers pressurised with a partial nitrogen gas blend.

History
In 1691, an article in the London Gazette mentioned John Lofting, who held a patent for a fire engine: "The said patentee has also projected a very useful engine for starting of beer, and other liquors which will draw from 20 to 30 barrels an hour, which are completely fixed with brass joints and screws at reasonable rates".

In the early 20th century, draught beer started to be served from pressurised containers. Artificial carbonation was introduced in the United Kingdom in 1936, with Watney's experimental pasteurised beer Red Barrel. Though this method of serving beer did not take hold in the UK until the late 1950s, it did become the favored method in the rest of Europe, where it is known by such terms as en pression. The carbonation method of serving beer subsequently spread to the rest of the world; by the early 1970s the term "draught beer" almost exclusively referred to beer served under pressure as opposed to the traditional cask or barrel beer.

In Britain, the Campaign for Real Ale (CAMRA) was founded in 1971 to protect traditional—unpressurised—beer and brewing methods. The group devised the term real ale to differentiate between beer served from the cask and beer served under pressure. The term real ale has since been expanded to include bottle-conditioned beer.

Keg beer
Keg beer is often filtered and/or pasteurised, both of which are processes that render the yeast inactive.

In brewing parlance, a keg is different from a cask. A cask has a tap hole near the edge of the top, and a spile hole on the side used for conditioning the unfiltered and unpasteurised beer. A keg has a single opening in the centre of the top to which a flow pipe is attached. Kegs are artificially pressurised after fermentation with carbon dioxide or a mixture of carbon dioxide and nitrogen gas or especially in Czech Republic solely compressed air.

Keg has become a term of contempt used by some, particularly in the UK, since the 1960s when pasteurised draught beers started replacing traditional cask beers.

Keg beer was replacing traditional cask ale in all parts of the UK, primarily because it requires less care to handle. Since 1971, CAMRA has conducted a consumer campaign on behalf of those who prefer traditional cask beer. CAMRA has lobbied the British Parliament to ensure support for cask ale and microbreweries have sprung up to serve those consumers who prefer traditional cask beer.

Pressurised CO2 in the keg's headspace maintains carbonation in the beer. The CO2 pressure varies depending on the amount of CO2 already in the beer and the keg storage temperature. Occasionally the CO2 gas is blended with nitrogen gas. CO2 / nitrogen blends are used to allow a higher operating pressure in complex dispensing systems.

Nitrogen is used under high pressure when dispensing dry stouts (such as Guinness) and other creamy beers because it displaces CO2 to (artificially) form a rich tight head and a less carbonated taste. This makes the beer feel smooth on the palate and gives a foamy appearance. Premixed bottled gas for creamy beers is usually 75% nitrogen and 25% CO2. This premixed gas, which only works well with creamy beers, is often referred to as Guinness Gas, Beer Gas, or Aligal (an Air Liquide brand name). Using "Beer Gas" with other beer styles can cause the last 5% to 10% of the beer in each keg to taste very flat and lifeless. In the UK, the term keg beer would imply the beer is pasteurised, in contrast to unpasteurised cask ale. Some of the newer microbreweries may offer a nitro keg stout which is filtered but not pasteurised.

Storage and serving temperature
Cask beer should be stored and served at a cellar temperature of 12 C. Once a cask is opened, it should be consumed within three days. Keg beer is given additional cooling just prior to being served either by flash coolers or a remote cooler in the cellar. This chills the beer to temperatures between 3 and 8 C.

Canned and bottled "draught"
The words "draft" and "draught" have been used as marketing terms to describe canned or bottled beers, implying that they taste and appear like beers from a cask or keg. Commercial brewers use this as a marketing tool although it is incorrect to call any beer not drawn from a cask or keg "draught". Two examples are Miller Genuine Draft, a pale lager which is produced using a cold filtering system, and Guinness stout in patented "Draught-flow" cans and bottles. Guinness is an example of beers that use a nitrogen widget to create a smooth beer with a dense head. Guinness has recently replaced the widget system from their bottled "draught" beer with a coating of cellulose fibres on the inside of the bottle. Statements indicate a new development in bottling technology that enables the mixture of nitrogen and carbon dioxide to be present in the beer without using a widget, making it according to Guinness "more drinkable" from the bottle.

In East Asian countries, such as China and Japan, the term "draft beer" applied to canned or bottled beer indicates that the beer is not pasteurised (though it may be filtered), giving it a fresher taste but shorter shelf-life than conventional packaged beers.

title: Draught beer


text:
Director

Director may refer to:

Literature

 * Director (magazine), a British magazine
 * The Director (novel), a 1971 novel by Henry Denker
 * The Director (play), a 2000 play by Nancy Hasty

Music

 * Director (band), an Irish rock band
 * Director (Avant album) (2006)
 * Director (Yonatan Gat album)

Arts and design

 * Animation director
 * Artistic director
 * Creative director
 * Design director
 * Film director
 * Music director
 * Music video director
 * Television director
 * Theatre director

Positions in other fields

 * Director (business), a senior-level management position
 * Director (colonial), head of chartered company's colonial administration for a territory
 * Director (education), head of a university or other educational body
 * Company director, a member of (for example) a board of directors
 * Cruise director
 * Executive director, senior operating officer or manager of an organization or corporation, usually at a nonprofit
 * Finance director or chief financial officer
 * Funeral director
 * Managing director
 * Non-executive director
 * Technical director
 * Tournament director

Science and technology

 * Director (military), a device that continuously calculates firing data
 * Adobe Director, multimedia authoring software
 * Fibre Channel director, a large switch for computer storage networks
 * Director telephone system, or Director exchange
 * GCR Class 11E or Directors, a class of locomotive
 * Director, the spatial and temporal average of the orientation of the long molecular axis within a small volume element of liquid crystal

Other uses

 * Director (1969 film), a Soviet film directed by Alexey Saltykov
 * Director (2009 film), an American film directed by Aleks Rosenberg
 * The Director, an artificial intelligence system in the video game Left 4 Dead
 * HMS Director (1784), a ship of the British Royal Navy
 * Directors beer, by Courage Brewery

People with the surname

 * Aaron Director (1901–2004), professor at the University of Chicago Law School
 * Kim Director (born 1974), American actress

title: Director