Which Type of Database Management is MySQLWhat is a Database?A database is a collection of data. Data organize is an efficient way for data to be retrieved easily. A database is designed in such a way that it can store large amounts of data. Following are the components of a Database. What are the components of any database?
What is a Relational Database?A Relational Database is a type of database. In a Relational Database, data is organized according to the relationship between data. In 1970, Edgar F. Codd introduced this concept. The following are the main features of Relational Database.
Let us explain each. 1. TablesThe data in the database is stored in a row-column fashion. Example- Below is the student table. ID, Name, birth, Gender, and CGPA are the attributes of the table. ID is a primary key. Run the following query. Output: 2. RowsThe row is nothing but a record. This is a horizontal record. 3. ColumnsColumn is the Attribute of a table. It is a vertical record. 4. KeysIn Relational Database Management System (RDBMS), keys are used to establish relationships between columns and different tables. There are many keys, such as Primary Key, Foreign Key, Composite Key, Candidate Key, Unique Key, and Super Key.
A primary key is a unique, not null, value in a table. A table can have only one primary key. The Column that is defined as a primary key cannot have duplicate value. Example In the above table, ID is a unique and NOT NULL value. ID is a primary key.
A foreign key in a table refers to the primary key in another table. By defining a foreign key, we can make a relationship between two tables. Example Student Table: Marks Table: In the above tables, ID is establishing a relationship between two tables. ID is a foreign key.
A composite key consists of multiple columns that, when combined, uniquely identify a record in a table. This is useful when a single column cannot guarantee uniqueness. Example: In the above table, ID and Course_ID together make a Composite Key.
A candidate key is a set of one or more Columns that can be uniquely recognized. One of the candidate keys must be a primary key. Example: Vehicle Table: In the above table, License_Plate and VIN both can be candidate keys.
A unique key is the same as a primary key, but a unique key can have a null value. Example Student Table: In the above table, Email is a unique key, but it also has no null values.
A super key is a set of one or more columns that, taken together, uniquely identify a record. It may contain more columns than necessary to identify a record uniquely. Example: Product Table: In the above table, Product_ID and Supplier_ID both can be super key. 5. Relationships:Relational Database Management Systems (RDBMS) establish relationships through primary and foreign keys, ensuring data integrity and efficient retrieval. Common types include primary and foreign keys. Some common types of relationships are
6. Normalization:Normalization is a process in relational databases to reduce redundancy, dependency, and anomalies. It involves decomposing tables and reorganizing data into different forms, each with specific rules.
In the case of the First Normal Form (1NF), each Row contains a single value. You cannot have multiple values. Example:
In the case of the Second Normal Form (2NF), the table must be in 1NF and make sure that every non-key Attribute depends fully on the primary key. After applying 2NF, the table will be: Instructor Table:
In the case of the Third Normal Form (3NF), the table must be in 2NF, and discard all dependencies. What is Relational Database Management System (RDBMS)?A Relational Database Management System (RDBMS) is a database software. It manages relational databases. It also allows us to interact with our database. We can insert, update, or delete our data. Some Relational Database Management Systems (RDBMS) are MySQL, PostgreSQL, Oracle DB, SQL Server, and SQL Lite. 1. MySQL MySQL is an open-source software. It is very well known for its speed and high performance. Vertical and Horizontal scaling supports both. ACID property is another great feature of MySQL. 2. PostgreSQL PostgreSQL is a database software with advanced features like full-text search JSON support. It is open-source for standards compliance, maintains data integrity via constraints, triggers, and rules, and supports Multi-Version Concurrency Control for effective transaction processing. 3. Oracle DB Oracle DB is a highly scalable, secure, high-availability, comprehensive data warehousing, business intelligence, and analytics product with robust security features, high availability through Oracle Real Application Clusters, and extensive support options for PL/SQL, a procedural language extension to SQL. 4. SQL Server With other Microsoft products, business intelligence features, scalable capabilities, robust security features, full-text search capabilities, and graph database support for efficient text searching, modelling, and querying graph data, the Microsoft Ecosystem software offers tight integration. 5. SQL Lite SQLite is a self-contained, serverless, zero-configuration database engine advisable for single-user applications and lightweight situations. On various platforms, requires minimal setup and administration, and supports ACID transactions, it works seamlessly for data consistency and reliability. In this tutorial, we will discuss MySQL as a Relational Database Management System (RDBMS) Historical Background of MySQL:MySQL, founded in 1995 in Sweden, was initially developed by Unireg and later by MySQL. In 2000, it became open source, with Marten Mickos as CEO in 2001. MySQL expanded its headquarters to the USA and Sweden in 2002. In 2003, it partnered with SAP, resulting in several features. In 2005, MySQL Network was launched, and in 2008, it was acquired by Sun Microsystems. Features of MySQL:1. Easy to access Since MySQL is open-source, any person can download, use, and modify the software. It can be easy to use and provided free of cost. MySQL's source code can be accessed for study and customization according to needs. It makes use of the GPL, or GNU General Public License, which provides restrictions for what is permissible and not permissible with the program. 2. Rapid and Trustworthy MySQL effectively saves information in memory to ensure consistency and prevent duplication. MySQL enables rapid access to and manipulation of data. 3. Adaptable The capacity of a system to work well with large or small groups of machines and other types of data is referred to as scalability. The MySQL server was created for handling big databases. 4. Data Formats Numerous data types are supported, including float (FLOAT), double (DOUBLE), character (CHAR), variable character (VARCHAR), text, date, time, datetime, timestamp, year, signed and unsigned integers, and many more. 5. Character Groups It is compatible with other character sets, such as German, Ujis, Latin 1 (cp1252 character encoding), other Unicode character sets, and so forth. 6. Be protected As a result of its customizable password system that verifies the password according to the host before allowing access to the database, it offers a safe interface. When the password is being connected to the server, it is encrypted. 7. Support with big databases Large databases, with up to 5,000,000,000 rows, 150,000-200,000 tables, and 40-50 million records, are supported by this software. Architecture of MySQL (Client-Server Model)MySQL architecture is the same as the client-server model. The MySQL database is mainly divided into three parts: the client, the server, and the Storage layer. Client LayerThe client Layer is the highest layer among all the layers. The Client Layer gets a request from the user via a command prompt or GUI and passes it to the server. Responsibilities of the client layers are:
Server LayerThe Server Layer is the second layer after the client layer. This layer deals with all the logical functions of the database. Sometimes, it is called the Barin of MySQL Architecture. The following are the parts of the server layer.
Storage LayerMaking it a widely used RDBMS, MySQL's unique Storage Engine Layer is preferred by developers. Disparate types of storage engines like InnoDB, MyISAM, NDB, and Memory are used for discrete situations. Components of MySQLMySQL is a popular open-source relational database management system (RDBMS). The main components of MySQL are -
The MySQL Server is the main element of MySQL advertised to the client. It has a responsibility to action the query and manage the transaction.
MySQL guards multiple storage engines to store, retrieve, and index data. Each storage engine has its connotation. Some familiar storage engines are InnoDB, MyISAM, MEMORY, etc.
The connectors are the software entrails. Between MySQL servers and other podiums, it provides an interface. Some common adapters are MySQL Connector/J:Java, MySQL Connector/C++: C++, etc.
Next TopicMySQL App
|