Skip to main content

Key Terminologies used in Relational Database

 1. Database


Definition:

A database is a structured collection of data stored and managed electronically. It allows for efficient data retrieval, manipulation, and management.

Characteristics:

- Structured: Data is organized in tables with rows and columns.

- Persistent: Data remains available over time.

- Accessible: Allows querying and manipulation through a Database Management System (DBMS).


2. Database Management System (DBMS)

Definition:

A DBMS is software that facilitates the creation, manipulation, and management of databases. It provides an interface for users and applications to interact with the data.

Characteristics:

- Data Definition: Allows creation and modification of database schemas.

- Data Manipulation: Supports querying, updating, and deleting data.

- Data Security: Manages user access and data integrity.

 3. Table (Relation)

Definition:

A table, also known as a relation, is a collection of rows and columns used to store data in a relational database.

Characteristics:

- Rows: Each row represents a single record or entity.

- Columns: Each column represents an attribute of the entity.

- Schema: Defines the structure, including column names and data types.


 4. Row (Tuple)

Definition:

A row, or tuple, represents a single record in a table. It is a set of related data values corresponding to the columns of the table.

Characteristics:

- Unique: Each row represents a unique instance of the entity.

- Data Integrity: Must conform to the table schema.

5. Column (Attribute)

Definition:

A column, or attribute, represents a data field in a table. It defines a specific type of data that each row in the table can hold.

Characteristics:

- Data Type: Specifies the kind of data stored, such as integer, text, or date.

- Constraints: Includes rules such as NOT NULL or UNIQUE.


 6. Primary Key

 Definition:

A primary key is a unique identifier for each record in a table. It ensures that no two rows have the same key value and cannot be NULL.

 Characteristics:

- Uniqueness: Guarantees that each record can be uniquely identified.

- Non-nullable: Cannot have NULL values.

- Single Key: Each table can have only one primary key.


 7. Foreign Key

 Definition:

A foreign key is a column or set of columns in one table that uniquely identifies a row in another table. It establishes a relationship between two tables.

 Characteristics:

- Referential Integrity: Ensures that the value in the foreign key column matches a value in the primary key of the referenced table.

- Nullable: Can accept NULL values, indicating optional relationships.

 8. Unique Key

 Definition:

A unique key ensures that all values in a column or a set of columns are distinct from one another across the table.

 Characteristics:

- Uniqueness: No two rows can have the same value for the unique key column(s).

- Nullable: Unlike primary keys, unique keys can have NULL values.

 9. Index

 Definition:

An index is a database object that improves the speed of data retrieval operations on a table at the cost of additional storage and maintenance overhead.

 Characteristics:

- Speed: Enhances query performance by allowing quicker searches.

- Types: Includes unique, composite, and full-text indexes.

- Maintenance: Indexes need to be updated when the table data changes.


 10. Schema

 Definition:

A schema is the structure of a database, including tables, columns, data types, relationships, and constraints.

 Characteristics:

- Design: Defines the organization and design of the database.

- Documentation: Provides a blueprint for database creation and modification.

 11. Normalization

 Definition:

Normalization is the process of organizing data to reduce redundancy and improve data integrity. It involves dividing a database into two or more tables and defining relationships between them.

 Characteristics:

- Normal Forms: Includes First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), and Boyce-Codd Normal Form (BCNF).

- Reduction of Redundancy: Eliminates duplicate data.

- Dependency: Ensures that data dependencies are logical.

 12. Denormalization

 Definition:

Denormalization is the process of combining tables to improve read performance at the cost of increased redundancy and potential write anomalies.

 Characteristics:

- Performance: Enhances query performance by reducing the number of joins needed.

- Redundancy: Introduces some level of data duplication.


 13. Query

 Definition:

A query is a request for data or information from a database using a query language, such as SQL (Structured Query Language).

 Characteristics:

- Data Retrieval: Allows users to select and display data from one or more tables.

- Data Manipulation: Includes INSERT, UPDATE, and DELETE operations.


 14. Transaction

 Definition:

A transaction is a sequence of one or more SQL operations executed as a single unit of work. Transactions ensure that operations are completed successfully or not executed at all.

 Characteristics:

- ACID Properties: Ensures Atomicity, Consistency, Isolation, and Durability.

- Commit/Rollback: Either commits all changes or rolls back to the previous state if an error occurs.

 15. View

 Definition:

A view is a virtual table based on the result of a query. It provides a way to present data in a particular format without storing it separately.

 Characteristics:

- Virtual Table: Does not store data physically but displays data from underlying tables.

- Security: Restricts user access to specific data.


 Quick Recap:

- Database: Structured data storage.

- DBMS: Software for managing databases.

- Table (Relation): Collection of rows and columns.

- Row (Tuple): Single record in a table.

- Column: Data field in a table.

- Primary Key: Unique identifier for records.

- Foreign Key: Links tables.

- Unique Key: Ensures distinct values.

- Index: Speeds up data retrieval.

- Schema: Database structure.

- Normalization: Reduces redundancy.

- Denormalization: Enhances performance.

- Query: Request for data.

- Transaction: Group of operations.

- View: Virtual table for data presentation.



Comments

Popular posts from this blog

Python OOPs Concepts: Using Variables and Methods

  Types of Variables in OOPs Python   Instance Variable Static Variable Local Variable   Object Level Variables Class Level Variables Method Level Variables When to use: For Every Object if you want Separate copy, use Instance Variables For all object one copy is required, use static variables Inside method, Just used for temporary requirement Where to Declare Inside the constructor method (in general) Within the class directly, outside of methods (in general)   Within the method only. How to Declare Within the constructor: Instance variables can be declared within the constructor method using the self .   Using default values : Instance variables can be assigned default values during initialization.   Outside the class: use object name.   ·          Within the class directly

Is Li-Fi Better than Wi-Fi?

Li-Fi  ( light fidelity )  is a bidirectional wireless system that transmit data to the devices like mobiles, laptop, etc., via infrared light or LED. The device has a receiver to pick up light signals and a transmitter to send light signal back to the lamp using infrared light or LED. It was first unveiled in 2011 and, unlike Wi-Fi, which uses radio frequency, Li-Fi technology only needs a light source with a chip to transmit an internet signal through light waves. Light fidelity (LiFi) is a faster, more secure and efficient wireless connection that uses light waves to transmit data Li-Fi technology still has a long way to go before worldwide adoption but every year, we are getting nearer to enjoying it for ourselves. The future surely looks bright with LiFi. How LiFi Works? LiFi makes use of visible light through overhead lighting for the transmission of data. This is possible through the use of a Visible Light Communications (VLC) system for data transmission. A VLC system has two q

Polymorphism: Method Overloading vs Method Overriding

  Method Overloading In object-oriented programming languages, method overloading enables a class to have several methods with the same name but different parameters. However, in Python, method overloading is not directly supported as opposed to languages such as Java or C++. This is because Python allows developers to define default arguments for their methods and pass arguments of any type to a method. This flexibility allows a single method to handle various types of arguments, eliminating the need for overloading.   However, there is a way to simulate method overloading in Python by using default argument values or variable length arguments and conditional statements. Here's an example: Program using default arguments:       Program using variable length arguments:   Multiple methods with Same Name: When we define multiple methods with same name, Python will consider the last defined method only. Python will not support method overloading. ( Why? Method overlo