MYSQL
MYSQL
DATABASE
DATABSE is a SYSTEMATIC COLLECTION OF DATA that can include words, numbers, images, videos,
and other types of files. Databases are managed using specialized software called a DATABASE
MANAGEMENT SYSTEM (DBMS), WHICH ALLOWS USERS TO STORE , RETRIEVE ,
AND MANIPULATE DATA EFFICIENTLY . It can be accessed and manage by the user very easily. it
allows us to organize data into tables, rows, columns, and indexes to find the relevant information very
quickly. many databases available like MySQL, Sybase, Oracle, MongoDB, PostgreSQL, SQL Server,
etc.
TYPES OF DATABASE
1. Relational Databases
2. Object-Oriented Databases
3. Hierarchical Databases
4. Network Databases
1.RELATIONAL DATABASES
A relational database’s contents are arranged as a collection of tables with rows and columns.
Examples: MySQL, PostgreSQL, Oracle, Microsoft SQL Server.
2. OBJECT-ORIENTED DATABASES
The data is represented and stored as objects which are similar to the objects used in the object-oriented
programming language.
Example: ObjectDB.
3. HIERARCHICAL DATABASES
It is the type of database that stores data in the form of parent-children relationship nodes. Here, it
organizes data in a tree-like structure. Data get stored in the form of records that are connected via links.
Each child record in the tree will contain only one parent. On the other hand, each parent record can
have multiple child records.
4.NETWORK DATABASES
It is the database that typically follows the network data model. Here, the representation of data is in
the form of nodes connected via links between them. Unlike the hierarchical database, it allows each
record to have multiple children and parent nodes to form a generalized graph structure.
In the area of database management, the data is arranged in two ways which are Relational Databases
(SQL) and Non-Relational Databases (NoSQL). While relational databases organize data
into structured tables, non-relational databases use various flexible data models like key-value pairs,
documents, graphs, and wide-column stores.
SQL
SQL stands for Structured Query Language. It is a standardized programming language used
to manage and manipulate relational databases. It enables users to perform a variety of tasks such as
querying data, creating and modifying database structures, and managing access permissions. SQL is
widely used across various relational database management systems such as MySQL, PostgreSQL,
Oracle, and SQL Server.
5.create table pets – will eventually creates the table within the specified database
describe pets;
alter table pets add colour varchar(30) not null after petName;