Database

In computing, a database is an organized collection of data (also known as a data store) stored and accessed electronically through the use of a database management system. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases spans formal techniques and practical considerations, including data modeling, efficient data representation and storage, query languages, security and privacy of sensitive data, and distributed computing issues, including supporting concurrent access and fault tolerance.
— Wikipedia

Database is a container (one or multiple files) which needed to store some sorted data usually linked to each other.

Databases/DBMS which I use/used:

NOTE

Follow-up information mostly added from Ben Forta’s SQL book 1.

A relational database (RDB) is a database based on the relational model of data.

Many relational database systems are equipped with the option of using SQL (Structured Query Language) for querying and updating the database.

Structure and properties of a database and their tables are described in schema.

Database table

Table is a structured data set of specific type. Data stored in a table should be the same type (orders, customers, etc.), don’t mix different types.

Database and table names should be unique.

Tables are consisted of columns, rows and cells, which store some information fragments, usually with specific type (integer, string, etc.).

Columns like tables should contain only one type of data (strict requirement). Level of information fragmentation is defined by requirements of the application.

Row is separate table record (same thing).

Basic RDBMS specific information

A database management system used to maintain relational databases is a relational database management system (RDBMS).

Data types and their names are main source of incompatibility between different RDBMS.

Primary key is a column (or set of columns, composite primary key), whose values are unique and used to identify each record in the table, to access them.

Is primary keys are strictly required?
They are not, but highly recommended. Even if today you don’t need them, they can be useful in the future.

Primary keys requirements?

  • Unique, two or more rows can’t have the same primary key values.
  • Primary key values can’t be NULL.
  • Primary key values usually can’t be changed (not recommended).
  • Primary key values usually can’t be reused, if you removed record, their primary key value can’t be assigned to another record.
    That rules applying to composite primary keys too (unique by combination of columns, not NULL, etc.).

Footnotes

  1. SQL in 10 Minutes a Day