A database generally refers to a structured collection of structured information or data stored electronically in a computer system. The database is usually controlled by a database management system (DBMS). Data and DBMS are referred to as 'database systems' along with related applications, and are also collectively referred to as 'databases' for short. (Oracle)
The reason for using a database is not to volatile data, but to store it for a long period of time and at the same time to keep it organized.
There are two main types of databases: relational databases (RDBMS) and non-relational databases called "NoSQL".
In a relational database, all data can be represented as a two-dimensional table.
Each row has its own primary key.
The first column in a table is always id . When you think of Excel or a spreadsheet, do you remember that the first column is always numbered (index) that does not change? Each row always has a unique number. This is called the Primary Key.
You can find or reference a specific row through this primary key.
There are three types of ralations between tables.
One to One : A relationship between a row in table A and a row in table B is exactly one-to-one. One A data is associated with one B data. One B data is also associated with one A data.
One to Many : A relationship in which a row in table A is connected to several rows in table B is called a one to many relationship. One row in A table is associated with multiple rows in B table. One row in B table is associated with one row in A table.
Many to Many : A relationship in which multiple rows in table A are linked to multiple rows in table B. Let's look at the relationship between a book and the author who wrote it. One author can write multiple books and a book can have multiple authors. In this way, when two tables are connected with multiple data from different tables, a junction table is created to input the combination of data belonging to the two tables.
If you put all the information in one table, the same information is redundantly stored unnecessarily. This will use more disks and increase the chances of erroneous data being stored. The two problems disappear if you divide the data into several tables and then link the necessary tables. This is called database normalization.
who need help improving their coding skills butterfly locs, daily game solve cross