Understanding Database Concepts
Tags: database, aws
Published: 2023-07-12 05:45:06

**Understanding Database Concepts**
A database is the organized storage of related data records into fields in a table which is persistent in nature, the stored data or records are generally related with a form of connection between them. 

![Components of a database table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddvof44x4ie0g3xa42zl.png)

 


**Database Schema**
This is a design that represents how the database would be structured. Database designers/administrators design schemas which detail the relationship among the data in the database, the constraints among others. Schemas could be represented visually by schema diagrams. 
 

![Example of database schema](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ygjc35202tauvdnl9lg.png)




**Entity Relationship**
An entity is an object that is identifiable. An example would be staffs in a company, they could be considered as entities. All these entities have some attributes or properties that give them their identity. Relationship is the connection between entities across tables, it allows division of information into useful components that allows readability and efficiency. 

 

![Visual representation of entity and relationships](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sq6psf3d03ho5edawmal.png)



The example below shows the relationship between the tables Student, Enrollment, Lecture, Lecturer and Subjects.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5x1pfmo84pq1wxo90dhs.png)


 

**Normalization **
This is a database design technique that helps minimize data redundancy (creation of multiple copies of the same data in the database).  Using normalization, a database table could be broken up into smaller tables with links within them to ensure the relationship within them. 

![Normalization of a table](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i9xsdghk6mzcgeq22ju0.png)
 

Normalization also helps prevent data anomalies like insertion, deletion and updation.

**Data Modelling**
A database has to be modelled first, which means it has to be designed in an architectural format that organizes the data description, the constraints on the data accepted and the data semantics. This helps understanding the database, building logical conception of the database and identifying missing and redundant data. It makes infrastructural upgrade and maintenance cheaper.



![Various types of data models](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v8bk8bo27kofdkglyjbj.png)


![Example of a data model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndks4qzek6kvx5izhmlp.png)


**Queries**
A database query allows for requesting data from the database either to manipulate or to retrieve the data requested. It is generally done using Structural Query language (SQL). SQL retrieves information from the database using a set of specified instructions example of database queries
 

![Example of SQL query](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/az8kdtuu2vsu40qrml5k.png)





**Data Integrity**
Data integrity is a process that ensures the security, accuracy, and overall quality of data. This makes sure that the data collected or stored in the database is validate and accepted plus store in the intended space for it. 

![Description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1gpg9vdiuqn5jk0dp6y.png)


 

References 
https://teachcomputerscience.com/the-database-concept
https://static.javatpoint.com/blog/images/database-schema.png
https://www.tutorialspoint.com/dbms/dbms_data_schemas.htm
https://www.guru99.com/database-normalization.html
https://www.javatpoint.com/dbms-normalization
https://teachcomputerscience.com/the-database-concept/
https://www.javatpoint.com/dbms-normalization
https://www.educative.io/blog/what-is-database-query-sql-nosql