Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
SQL Tutorial
Next article icon

Getting started with Databases : Essential Guide for Beginners

Last Updated : 19 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Databases and data are the fundamental building blocks of new technology. Data is the building blocks of information, like numbers, words, pictures, and more, that computers use and process. Databases, on the other hand, are like organized libraries, making sure this data is stored, retrieved, and managed effectively.

In this article, we'll explore the different types of databases from the classic SQL to the trendy NoSQL and even Cloud databases. We will also explore the different databases for web development, backend development, mobile development, DevOps, data engineering, data science, artificial intelligence, cloud computing, and even blockchain/web 3.0.

TypesDB
Types of Databases

Table of Content

  • What are Data & Databases?
  • What is DBMS?
  • Types of Databases
  • Databases Cheat Sheet
  • Databases Interview Questions
  • Database Query Based Questions
  • Databases Comprehensive Learning Path
  • Database Design
  • Database Connectivity
  • Database Interview Experience
  • Databases Required for Different Technology
  • Types of Database Jobs
  • Tips & Tricks to Improve Database Knowledge

What are Data & Databases?

Data refers to any piece of information. It can be numbers, words, images, sounds, or any other information that a computer can store and process. Data can be raw or processed.

A database is a structured collection of data that is organized in a way to facilitates efficient storage, retrieval, and manipulation of information. It acts as a centralized and organized repository where data can be stored, managed, and accessed by various applications or users.

What is DBMS?

A Database Management System (DBMS) is a software system that enables users to define, create, maintain, and manipulate databases. It provides an interface between the database and the users or applications, allowing them to access and manage data efficiently.

DBMS

The primary functions of a DBMS include:

  1. Data Definition: Defining the database structure, including specifying data types, relationships between data elements, and constraints.
  2. Data Manipulation: Inserting, updating, deleting, and retrieving data from the database using queries and commands.
  3. Data Security: Enforcing access control to ensure that only authorized users can access and modify the data.
  4. Data Integrity: Maintaining the accuracy, consistency, and reliability of the data through validation rules and constraints.
  5. Concurrency Control: Managing simultaneous access to the database by multiple users or applications to prevent conflicts and ensure data consistency.
  6. Backup and Recovery: Providing mechanisms for backing up data and recovering it in case of system failures or data corruption.

Types of Databases

There are various types of databases, each designed for specific use cases and requirements. Here are some common types of databases:

1. Relational Databases (SQL databases)

Relational databases(RDBMS) organize data into tables, where each table has rows and columns. These databases use structured query language (SQL) for defining and manipulating data.

relational-db

These are the following relational databases:

  • MySQL
  • PostgreSQL
  • Oracle (PL/SQL, programming language extension for Oracle Database)
  • SQL Server
  • SQLite
  • MariaDB
  • IBM Db2

2. NoSQL Databases

These databases are designed to handle large volumes of unstructured, semi-structured, or structured data. NoSQL provide flexible schema designs and often offer horizontal scalability.

TypesofNoSQLdatabase

Types of NoSQL databases

  • Document databases: Store data in flexible, JSON-like documents.
    • MongoDB
    • Couchbase
  • Key-value stores: Simplest NoSQL databases, storing data as key-value pairs.
    • Redis
    • Amazon DynamoDB.
  • Column-family stores: Store data in columns rather than rows.
    • Apache Cassandra
    • HBase.
  • Graph databases: Optimize for data with complex relationships.
    • Neo4j
    • Amazon Neptune.

3. Cloud Databases

Cloud databases are online databases that store and manage data in a cloud computing environment. They offer various advantages such as scalability, reliability, and accessibility.

CloudDB
Cloud Database
  • Amazon RDS (Relational Database Service)
  • Amazon Aurora
  • Azure SQL Database
  • Google Cloud SQL
  • Microsoft Azure SQL Database
  • IBM Db2 on Cloud
  • Amazon DynamoDB
  • Azure Cosmos DB
  • Cloud Firestore(Google Cloud Firebase)

4. In-Memory Databases

In-memory databases store data primarily in RAM rather than on disk, resulting in faster data access.

  • Redis
  • Memcached

5. Time-Series Databases

Time-series databases are optimized for storing and querying time-stamped data, such as sensor data, IoT data, and financial market data.

  • InfluxDB
  • Prometheus

6. NewSQL Databases

NewSQL databases aim to combine the scalability and flexibility of NoSQL databases with the ACID compliance and SQL querying capabilities of traditional relational databases.

  • CockroachDB
  • Google Spanner.

7. Object-Oriented Databases

Object-oriented databases organize and store data in a way that reflects the principles of object-oriented programming (OOP). In OODBs, data is represented as objects, which encapsulate both data and the methods or functions that operate on that data.

  • db4o
  • ObjectDB

8. Hierarchical Databases

Hierarchical databases organize data in a tree-like structure where each record has one parent record and multiple child records, forming a hierarchy. Records are linked together in parent-child relationships, with each child record having only one parent.

  • IMS (Information Management System)

9. Network databases

Network databases are a type of database model that represents data as collections of records and sets, with relationships defined between records. Unlike hierarchical databases, where records form a strict parent-child hierarchy, network databases allow records to have multiple parent and child records, forming a network structure.

  • IDMS (Integrated Database Management System)

10. Centralized Database

Centralized databases are a type of database architecture where data is stored and managed in a single location or server. In this architecture, all data processing and management tasks are performed on the central server, and clients access the database remotely.

  • ISAM (Indexed Sequential Access Method)

11. Operational Database

Operational databases are databases optimized for supporting day-to-day operations and transactional processing within an organization. They are designed to efficiently handle tasks such as adding, modifying, and retrieving data in real-time to support business operations.

  • Amazon Aurora
  • Teradata

Databases Cheat Sheet

Cheat sheets are concise, quick-reference guides that provide key information about a particular topic. These are the cheat sheet of Different Databases.

  • SQL Cheat Sheet
  • SQL Command Cheat Sheet
  • MySQL Cheat Sheet
  • PL/SQL Cheat Sheet
  • PostgreSQL Cheat Sheet

Databases Interview Questions

Whether you're preparing for a job interview or aiming to brush up on your database fundamentals, these interview question will help through some common and advanced database interview.

  • SQL Interview Questions
  • SQL Query Interview Questions
  • MySQL Interview Questions
  • PL/SQL Interview Questions

Database Query Based Questions

Query-based database questions are an essential component of practicing and mastering database skills. These questions typically involve retrieving, manipulating, and analyzing data stored within a database using SQL (Structured Query Language) or other query languages specific to the database management system being used.

  • Database Query Questions
  • SQL Exercises
  • MySQL Exercises
  • PostgreSQL Exercises
  • PL/SQL Exercises
  • MongoDB Exercises

Databases Comprehensive Learning Path

Whether you're just starting your journey into the world of databases or aiming to enhance your expertise, this curated learning path is designed to guide us from the fundamentals to advanced concepts in a structured and accurate manner.

  • Learn SQL and Database

Database Design

Database design is a critical aspect of product development, providing the foundation for storing, managing, and accessing data effectively. It ensures that the product can scale, perform optimally, and maintain data integrity, ultimately contributing to its success in the market.

  • Database Design
  • How to Design a Database for a New Project?
  • How to Design Database for Logistics and Transportation
  • How to Design Database for Social Media Platform
  • How to Design Database for Flight Reservation System
  • How to Design ER Diagrams for E-commerce Website

Database Connectivity

Database Connectivity refers to the capability of software applications to interact with and access data stored in databases. Database Connectivity is crucial for various types of applications, including web applications, mobile apps, desktop applications, and APIs.

  • How to Connect Database with Web Application
  • How to retrieve data from database to frontend?
  • How to send data from frontend to database?
  • How to connect frontend to SQL database?
  • How do you connect backend to database?
  • How to connect API to a database?

There are several mechanisms for establishing connectivity between applications and databases

  • ORM (Object-Relational Mapping)
  • ODM (Object-Document Mapping)
  • ODBC (Open Database Connectivity)

Database Interview Experience

In database interview experience series, we share some of the interview experience of individuals who've faced the challenges of database interviews. From SQL to NoSQL, each article offers insights and tips to help you ace your next interview.

  • MongoDB

Databases Required for Different Technology

In today's technology-driven world, databases play a pivotal role in powering diverse applications across different domains. From Frontend Development to Artificial Intelligence, each technology has unique requirements for data storage, retrieval, and management. Let's delve into the specific databases required for various technological domains.

1. Databases for Web Developement

In web development, databases serve as the backbone for storing, retrieving, and managing data critical for web applications. Whether you're building a simple blog or a complex e-commerce platform, understanding databases is essential for creating dynamic and interactive websites. here we can learn in more depth about Which Database You Should Choose For Web Development?

2. Database for Mobile Development

In mobile development, databases play a pivotal role in storing, accessing, and organizing data crucial for mobile applications. Whether you're crafting a fitness tracker or a social networking app, a solid understanding of databases is fundamental for delivering efficient and seamless user experiences.

3. Database for DevOps

In the DevOps, where the seamless integration of development and operations is paramount, the choice of database plays a crucial role in enabling efficient collaboration, continuous delivery, and automated deployment pipelines. DevOps teams typically require databases that offer high availability, scalability, and compatibility with automation tools.

4. Database for DataEngineer

Data engineers play a pivotal role in building and maintaining data infrastructure that powers analytics, machine learning, and decision-making processes within organizations. When selecting a database for data engineering tasks, considerations such as data volume, velocity, variety, and the need for real-time processing come to the forefront.

5. Database for DataScientist

For data scientists, the choice of database is critical as it directly impacts the efficiency of data exploration, modeling, and analysis tasks. Data scientists typically require databases that support complex queries, provide efficient data retrieval mechanisms, and seamlessly integrate with popular data science tools and libraries.

6. Database for Artificial Intelligence

Artificial intelligence (AI) applications rely heavily on data to train machine learning models, make predictions, and drive decision-making processes. When selecting a database for AI tasks, considerations such as data scalability, model training efficiency, and real-time inference capabilities are paramount.

7. Database for Cloud Computing

Cloud computing has revolutionized the way organizations deploy, manage, and scale their IT infrastructure. When selecting a database for cloud computing environments, considerations such as scalability, reliability, and integration with cloud services become paramount.

8. Database for Blockchain/Web3.0

Blockchain technology, synonymous with decentralization and immutability, has revolutionized various industries, including finance, supply chain, and healthcare. When selecting a database for blockchain and Web3.0 applications, considerations such as data integrity, transparency, and consensus mechanisms come to the forefront.

Types of Database Jobs

The field of databases offers a diverse range of job roles, each requiring different levels of experience and expertise. As professionals progress in their careers, they can specialize in roles that align with their skills and interests. Let's explore into different types of job roles, considering the required experience levels.

Job Role

Experience

Sallary

Database Administrator (DBA)

Entry-level require 1-3 years of experience, while senior roles require 5+ years.

4 to 15 LPA

Database Developer

Entry-level roles 1-3 years of experience, while senior developers need 5+ years.

4 to 12 LPA

Data Analyst

Entry-level positions require 1-3 years of experience, while senior data analysts need 5+ years.

3 to 8 LPA

Data Engineer

Entry-level roles require 1-3 years of experience, while senior data engineers need 5+ years

4 to 15 LPA

Database Architect

Entry-level positions require 3-5 years of experience, while senior architects need 8+ years.

7 to 24 LPA

Database Manager

Mid-level management require 5-8 years of experience, while senior management roles need 10+ years.

8 to 18 LPA

Tips & Tricks to Improve Database Knowledge

Improving your database knowledge can be both rewarding and valuable in various fields, including software development, data analysis, and system administration. Here are some tips and tricks to help you enhance your understanding:

  • Understand the Fundamentals: Start by grasping the basic concepts such as tables, rows, columns, primary keys, foreign keys, indexes, and normalization. These form the foundation of database management.
  • Learn SQL: SQL (Structured Query Language) is the language used to communicate with relational databases. Familiarize yourself with SQL syntax, data manipulation (SELECT, INSERT, UPDATE, DELETE), data definition (CREATE, ALTER, DROP), and data control (GRANT, REVOKE) statements.
  • Practice Regularly: The best way to solidify your knowledge is through practice. Work on SQL queries, database design, database exercises, and data manipulation tasks regularly.
  • Build Projects: Apply your database skills by working on real-world projects. Create a personal database-backed application, such as a task tracker, inventory management system, or blogging platform. Building something tangible reinforces your understanding and showcases your abilities.
  • Explore Different Database Systems: Get hands-on experience with various database management systems (DBMS) such as MySQL, PostgreSQL, SQLite, MongoDB, or Redis. Each has its strengths, weaknesses, and use cases. Understanding multiple systems broadens your perspective and versatility.
  • Study Database Design: Learn about database design principles like normalization, denormalization, entity-relationship modeling, and schema design. A well-designed database is crucial for efficient data storage, retrieval, and maintenance.
  • Stay Updated: The field of database management is continually evolving with new technologies, best practices, and trends. Stay updated with the latest advancements, tools, and techniques by following industry news, attending webinars, and participating in conferences.

Conclusion

Well, this end of this amazing written getting started with Database. While database looks bit complex at first but through this guide you will learn database easily. So keep exploring and try to get mastery in it.


Next Article
SQL Tutorial

S

shwetaagra456
Improve
Article Tags :
  • DBMS

Similar Reads

    Getting started with Databases : Essential Guide for Beginners
    Databases and data are the fundamental building blocks of new technology. Data is the building blocks of information, like numbers, words, pictures, and more, that computers use and process. Databases, on the other hand, are like organized libraries, making sure this data is stored, retrieved, and m
    12 min read
    SQL Tutorial
    SQL is a Structured query language used to access and manipulate data in databases. SQL stands for Structured Query Language. We can create, update, delete, and retrieve data in databases like MySQL, Oracle, PostgreSQL, etc. Overall, SQL is a query language that communicates with databases.In this S
    11 min read
    MySQL Tutorial
    This MySQL Tutorial is made for both beginners and experienced professionals. Whether you're starting with MYSQL basics or diving into advanced concepts, this free tutorial is the ideal guide to help you learn and understand MYSQL, no matter your skill level. From setting up your database to perform
    11 min read
    PostgreSQL Tutorial
    In this PostgreSQL tutorial you’ll learn the basic data types(Boolean, char, text, time, int etc.), Querying and Filtering techniques like select, where, in, order by, etc. managing and modifying the tables in PostgreSQL. We’ll cover all the basic to advance concepts of PostgreSQL in this tutorial.
    8 min read
    PL/SQL Tutorial
    Explore this PL/SQL tutorial to effortlessly learn PL/SQL – It is perfect for beginners and experienced ones. Whether you're new to it or diving deep, this interactive guide simplifies database programming.Learn hands-on with practical examples, making your journey fun and effective. Learn PL/SQL's
    8 min read
    MongoDB Tutorial
    In today's data-driven world, the ability to efficiently store, manage and process large volumes of data is crucial. MongoDB, a powerful NoSQL database, has become a popular choice for developers due to its flexibility, scalability, and high performance. Unlike traditional relational databases, Mong
    10 min read
    SQL Cheat Sheet ( Basic to Advanced)
    Creating and managing databases in SQL involves various commands and concepts that handle the structuring, querying, and manipulation of data. In this guide, we will see a comprehensive cheat sheet for essential SQL operations, offering a practical reference for tasks ranging from database creation
    15 min read
    SQL Interview Questions
    Are you preparing for a SQL interview? SQL is a standard database language used for accessing and manipulating data in databases. It stands for Structured Query Language and was developed by IBM in the 1970s, SQL allows us to create, read, update, and delete data with simple yet effective commands.
    15+ min read
    MySQL Interview Questions
    MySQL is an open-source Relational Database Management System(RDMS) that organizes data in tables using rows and columns. It uses Structured Query Language (SQL) for managing and manipulating databases. It was originally developed by MySQL AB, a Swedish company, and is now owned by Oracle Corporatio
    15 min read
    PL/SQL Interview Questions and Answers
    PL/SQL (Procedural Language for SQL) is one of the most widely used database programming languages in the world, known for its robust performance, flexibility, and tight integration with Oracle databases. It is a preferred choice for many top companies such as Oracle, IBM, Accenture, Infosys, TCS, C
    14 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length <= 2000){ var payload = { "gfg_post_id" : `${post_id}`, "suggestion" : `${editorValue}`, } if(!loginData || !loginData.isLoggedIn) // User is not logged in payload["g-recaptcha-token"] = gCaptchaToken jQuery.ajax({ type:'post', url: "https://apiwrite.geeksforgeeks.org/suggestions/auth/create/", xhrFields: { withCredentials: true }, crossDomain: true, contentType:'application/json', data: JSON.stringify(payload), success:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('.suggest-bottom-btn').css("display","none"); $('#suggestion-section-textarea').hide() $('.thank-you-message').css('display', 'flex'); $('.suggestion-section').css('display', 'none'); jQuery('#suggestion-modal-alert').hide(); }, error:function(data) { if(!loginData || !loginData.isLoggedIn) { grecaptcha.reset(); } jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Something went wrong."); jQuery('#suggestion-modal-alert').show(); error_msg = true; } }); } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Minimum 4 Words and Maximum Words limit is 1000."); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } } else{ jQuery('.spinner-loading-overlay:eq(0)').remove(); jQuery('#suggestion-modal-alert').html("Enter atleast four words !"); jQuery('#suggestion-modal-alert').show(); jQuery('.ContentEditable__root').focus(); error_msg = true; } if(error_msg){ setTimeout(() => { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences