A database comprises a collection of related data and information such that the data is about a single topic. It typically consists of tables of organized information for a specific function. Database operations are of 4 types – Create, Read, Update and Delete and are collectively known as CRUD operations. A table is a collection of rows that have associated columns and it is the principal unit to physically store data in the database. While a column specifies the attributes of the information stored in a table, a row records a single instance of data associated with an entity. In the actual world, it is a very essential component as it represents the basic elements of information available.
A database represents the overall design of a database and gives the users the associated entities and attributes by specifying the relationship among them. It has three models or views. The conceptual or logical model helps to characterize database structures. The internal or physical model separates the OS from the physical storage of data. The external model or application interface addresses the relationship between a user and the data model.
The association among the several entities of a database is known as relationship and it is established for eliminating data redundancy and inconsistency. There are 4 types of relationships that are possible in a table – one to one, one to many, many to one, and many to many.
A key controls the integrity of information in a database and is the column value of the table. A super key is a combination of one or more than one attribute which can be used for uniquely identifying an entity from an entity set. A candidate key is a minimal super key without a proper subset. A primary key uniquely identifies the records or instances of a table. It should always contain unique values that are rarely changed, and also, they do not allow any duplicate values. A composite key is a primary key and is the combination of two or more uniquely identifying columns of a table. A foreign key is a key column value in a table that refers to the corresponding primary key of another table.
Normalization is a process by which data in a database is organized into optimized table structures for ensuring data integrity by eliminating data redundancy and, consequently, inconsistent dependency among them. In 2NF there is no partial dependency and all attributes are functionally dependent on the primary key. In BCNF all the determinants of the table are candidate keys having a nontrivial functional dependency. In 4NF the table does not have a multivalued dependency and in 5NF the table does not have any cyclic dependency.
A database management system or DBMS helps in entering, organizing, and selecting interrelated data in a database. It has certain ACID properties which allow the users to safely share the data and these are – atomicity, consistency, isolation, and durability.