
References Database Management System Nemi Chandra Rathore Department of Computer Science Central University of South Bihar, Gaya April 5, 2020 Nemi Chandra Rathore MySQL: An Introduction 1/85 References Outline History of Databases Introduction to MySQL MySQL Architecture Installing and configuring MySQL References Nemi Chandra Rathore MySQL: An Introduction 2/85 References History of Databases[5] Based on Data Models history of databases development can be divided into three eras. 1 Navigational 2 Relational 3 Post-Relational Integrated data store (IDS), first general-purpose DBMS designed by Charles Bachman atGE. IDS was based on network model. Bachman received Turing Award in 1973 for his work in database area. Nemi Chandra Rathore MySQL: An Introduction 3/85 References History of Databases.. In 1966 IBM developed their own DBMS known as Information Management System(IMS)1 which was based on hierarchical model. American Airlines and IBM jointly developed SABRE (Semi-Automatic Business Research Environment) for making airline reservations. In 1970, Edgar Codd while working at IBM proposed a new model called Relational Database Model in his famous paper titled “A Relational Model of Data for Large Shared Data Banks". 1NASA’s Apollo space program. Nemi Chandra Rathore MySQL: An Introduction 4/85 References History of Databases.. In 1973 the System R project was started at IBM. The outcome of the project would later become the widely used Structured Query Language (SQL) database upon its release in 1981. Oracle (as “Relational Software, Inc.”) were first to commercialize the technology in 1979. Following Codd’s paper two people at University of California, Berkeley, Eugene Wong and Michael Stonebraker started a project known as INGRES in early 1970. Nemi Chandra Rathore MySQL: An Introduction 5/85 References History of Databases.. RDBM Systems were an efficient way to store and process structured data. With time the processing speeds got faster, and “unstructured” data (art, photographs, music, etc.) became much more common place. NoSQL2 databases is essentially the rejection of the ‘relational structuring of data’ inherent to RDBMS[1]. The NoSQL model is non-relational and uses a “distributed” database system 2Not only SQL Nemi Chandra Rathore MySQL: An Introduction 6/85 References History of Databases.. It allows ad-hoc changes and dynamism demanded by a growing enterprise than the relational database does. Unstructured data is both non-relational and schema-less. Relational Database Management Systems simply were not designed to handle this kind of data. Nemi Chandra Rathore MySQL: An Introduction 7/85 References MySQL Brief History MySQL was created by a Swedish company, MySQL AB (now owned by Oracle Corporation since 2010), founded by David Axmark, Allan Larsson and Michael “Monty” Widenius in May-1995. MySQL (officially pronounced as “My-S-Q-L”, ) is an open-source relational database management system (RDBMS) written inC and C++. It is named after co-founder Michael Widenius’s daughter, ‘My’. Nemi Chandra Rathore MySQL: An Introduction 8/85 References Features MySQL is offered under two different editions: the open source MySQL Community Server and the proprietary Enterprise Server. Enterprise Server is differentiated by a series of proprietary extensions which install as server plugins. Major features as available in MySQL 5.6: 1 A broad subset of ANSI SQL 99, as well as extensions. 2 Cross-platform support. 3 Stored procedures,Triggers, Cursor, updatable views. 4 Online DDL when using the InnoDB Storage Engine 5 SSL Support 6 Query Caching 7 Unicode Support etc. Nemi Chandra Rathore MySQL: An Introduction 9/85 References MySQL Architecture MySQL architecture consists of 5 following components: 1 The Query Engine 2 The Storage Manager 3 The Buffer Manager 4 The Transaction Manager 5 The Recovery Manager In addition to these five primary sub-systems MySQL architecture contains following 2 support sub-systems: 1 Process Manager 2 Function Libraries Nemi Chandra Rathore MySQL: An Introduction 10/85 References MySQL Architecture: The Query Engine The Query Engine: This sub-system consists of following 3 interrelated components: 1 The Syntax Parser: It parses the SQL query and decomposes it in a form understandable by MySQL Engine. 2 The Query Optimizer: It generates an optimal execution plan for the query. 3 The Execution Component: It interprets the execution plan and makes request to other components to retrieve desired data. Nemi Chandra Rathore MySQL: An Introduction 11/85 References MySQL Architecture: The Storage Manager The Storage Manager: It interfaces with the Operating System to write data to the disk efficiently. With the help of Function Libraries it write the data in the tables, indexes, logs and internal system data. The Query Cache: It caches the result of frequent queries and returns the resulted records if the same query is submitted again. It results in reduction in response time. Nemi Chandra Rathore MySQL: An Introduction 12/85 References MySQL Architecture..... The Buffer Manager: Handles all memory management issues regarding request for data between the Query Engine and the Storage Manager. The Transaction Manager: Facilitates concurrency in data access among transactions. Has a Lock Manager sub-component to avoid any concurrent access anomaly. Nemi Chandra Rathore MySQL: An Introduction 13/85 References MySQL Architecture..... The Recovery Manager: Creates logs and other related information to ensure recovery from any failure. So far only InnoDB andBDB table handlers provide recovery management. The MyISAM handler doesn’t provide transactional recovery. The Process Manager: Manages user connections . Provides synchronization among competing tasks and process via modules for multi-threading, thread locking and performing thread-safe operations. Nemi Chandra Rathore MySQL: An Introduction 14/85 References MySQL Architecture..... Function Libraries: This component contains general purpose routines used by other subsystems. Includes routine’s for string manipulation, sorting operations and operating system specific functions such as memory management and file I/O. Nemi Chandra Rathore MySQL: An Introduction 15/85 References MySQL Architecture: Storage engines Storage engines: Storage engines are MySQL components that handle the SQL operations for different table types InnoDB is the default and most general-purpose storage engine. To determine which storage engines your server supports, use the SHOW ENGINES statement. Nemi Chandra Rathore MySQL: An Introduction 16/85 References MySQL Architecture: Storage engines InnoDB (the default one): 1 InnoDB is a transaction-safe (ACID compliant) storage engine for MySQL that has commit, rollback, and crash-recovery capabilities to protect user data. 2 uses row-level locking 3 stores user data in clustered indexes to reduce I/O for common queries based on primary keys 4 To maintain data integrity, supports FOREIGN KEY referential-integrity constraints. MyISAM 1 Uses table-level locking that limits the performance in read/write workloads Nemi Chandra Rathore MySQL: An Introduction 17/85 References MySQL Architecture: Storage engines Memory 1 Stores all data in RAM, for fast access in environments that require quick look-ups of non-critical data. 2 Its use cases are decreasing; InnoDB with its buffer pool memory area provides a general-purpose and durable way to keep most or all data in memory, 3 NDBCLUSTER provides fast key-value lookups for huge distributed data sets. CSV 1 Its tables are really text files with comma-separated values, and are used to exchange data with scripts and applications. 2 use CSV tables during the import or export stage. Archive: These compact, unindexed tables are intended for storing and retrieving large amounts of seldom-referenced historical, archived, or security audit information. Nemi Chandra Rathore MySQL: An Introduction 18/85 References MySQL Architecture: Storage engines Archive 1 These compact, unindexed tables are intended for storing and retrieving large amounts of seldom-referenced historical, archived, or security audit information. Blackhole: 1 The Blackhole storage engine accepts but does not store data, similar to the Unix /dev/null device. Queries always return an empty set. 2 These tables can be used in replication configurations where DML statements are sent to slave servers, but the master server does not keep its own copy of the data. Nemi Chandra Rathore MySQL: An Introduction 19/85 References MySQL Architecture: Storage engines NDB 1 NDB (also known as NDBCLUSTER): This clustered database engine is particularly suited for applications that require the highest possible degree of uptime and availability. Merge: 1 Enables a MySQL DBA or developer to logically group a series of identical MyISAM tables and reference them as one object. 2 Good for VLDB (Very Large Database) environments such as data warehousing. Nemi Chandra Rathore MySQL: An Introduction 20/85 References MySQL Architecture: Storage engines Federated: 1 Offers the ability to link separate MySQL servers to create one logical database from many physical servers. 2 Very good for distributed or data mart environments. Example: 1 This engine serves as an example in the MySQL source code that illustrates how to begin writing new storage engines. 2 It is primarily of interest to developers. The storage engine is a “stub” that does nothing. You can create tables with this engine, but no data can be stored in them or retrieved from them. Nemi Chandra Rathore MySQL: An Introduction
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages87 Page
-
File Size-