Data is organized in a data storage
hierarchy of increasingly complex levels: bits, bytes (characters), fields,
records, files, and databases. A character is a letter, number, or special
character. A field consists of one or more characters (bytes). A record is a
collection of related fields. A file is a collection of related records. A
database is, as mentioned, an organized collection of integrated files.
Important to data organization is the key field, a field used to uniquely
identify a record so that it can be easily retrieved and processed.
Introduction to database
Every one deals with data every day. When anyone wants to listen to his/her favorite songs, he opens his playlist from the smartphone. In this case, the playlist is a database.
When you take a photo and upload it to your account in a social network like Facebook, your photo gallery is a database.
Databases are everywhere. So what is a database? By definition, a database is simply a structured collection of data or you can say – a collection of information.
The data relates to each other by nature e.g., a product belongs to a product category and associated with multiple tags. This is why we use the term relational database. In the relational database, we model data like products, categories, tags, etc., using tables. A table contains columns and rows. It is like a spreadsheet.
A table may relate to another table using a relationship e.g., one-to-one and one-to-many relationships.
Because we deal with a large amount of data, we need a way to define the databases, tables, etc., and process data more effectively. In addition, we want to turn the data into information.
SQL – the language of database SQL stands for structured query language. SQL is the standardized language used to access the database.
ANSI/SQL defines the SQL standard. The current version of SQL is SQL:2003. Whenever we refer to the SQL standard, we mean the current SQL version.
SQL contains three parts:
- · Data definition language contains statements that help you define the database and its objects e.g., tables, views, triggers, stored procedures, etc.
- · Data manipulation language contains statements that allow you to update and query data.
- · Data control language allows you to grant the permissions to a user to access a certain data in the database.
MySQL is an open source relational database management system (RDBMS) based on Structured Query Language (SQL). It is used to manage the relational database by exploiting SQL. Its name is a combination of "My", the name of co-founder Michael Widenius's daughter, and "SQL", the abbreviation for Structured Query Language. MySQL is a database management system that allows you to manage relational databases. It is open source software backed by Oracle. It means you can use MySQL without paying a dime. In addition, if you want, you can change its source code to suit your needs. MySQL is pretty easy to master in comparison with other database software like Oracle Database, or Microsoft SQL Server. MySQL can run on various platforms UNIX, Linux, Windows, etc. You can install it in a server or even in a desktop. In addition, MySQL is reliable, scalable, and fast.