DEV Community

Cover image for Understanding Database Concepts
QueTeddy
QueTeddy

Posted on

Understanding Database Concepts

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

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

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

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

Image description

*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

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

Example of a data model

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

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

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

Top comments (0)