MySQL

Introduction to Databases

Before understanding the MySQL and its implementation of the SQL language, it is important that you understand some basic concepts about databases and database technologies.

What Is a Database?

Database is a container (a file or set of files) to store organized data.

For example when you select an email from your inbox, you are using a database. If you conduct a search on Google, you are using a database.

A database is a collection of data stored in some organized fashion. The simplest way to think of it is to imagine a database as a filing cabinet. The filing cabinet is simply a physical location to store data, regardless of what that data is or how it is organized.

DBMS (Database Management System)

People often use the term database to refer to the database software they are running. This is incorrect, database software is actually called the Database Management System (or DBMS). The database is the container created and manipulated via the DBMS. A database might be a file stored on a hard drive, you never access a database directly anyway, you always use the DBMS and it accesses the database for you.

Tables

A table is a structured file that can store data of a specific type. A table might contain a list of customers, a product catalog, or any other list of information.

The key here is that the data stored in the table is one type of data or one list. You would never store a list of customers and a list of orders in the same database table. Doing so would make subsequent retrieval and access difficult. Rather, you'd create two tables, one for each list.

Every table in a database has a unique name that identifies it, no other table in a database can have the same name but you definitely can reuse table names in different databases

Tables have characteristics and properties that define how data is stored in them. These include information about what data may be stored, how it is broken up, how individual pieces of information are named, and much more. This set of information that describes a table is known as a schema, and schema are used to describe specific tables within a database, as well as entire databases (and the relationship between tables in them).

by BrainBellupdated
Advertisement: