DSA

Recursion

Recursion

The process in which a function calls itself directly or indirectly with a failure condition is called recursion.

Properties of Recursion:

Performing the same operations multiple times with different inputs.
In every step, we try smaller inputs to make the problem smaller.
Base condition is needed to stop the recursion otherwise infinite loop will occur.

How are recursive functions stored in memory?

Recursion uses more memory, because the recursive function adds to the stack with each recursive call, and keeps the values there until the call is finished. The recursive function uses LIFO structure.

[Read More]

05-DBMS | ACID Properties

Transaction,ACID Properties, Transaction states

Transaction

  • A unit of work done against the DB in a logical sequence.
  • It is a logical unit of work that contains one or more SQL statements
  • All these statements in a transaction either gets
    • Completed successfully (all the changes made to the database are permanent)
    • Or if at any point any failure happens it gets rollbacked (all the changes being done are undone.)
  • Sequence is very important in transaction.
[Read More]

03-DBMS | Relational Model

Relational Model, Transform - ER Model to Relational Model

Relational Model

  • Data relation represented in the form of table with columns and rows are called Relational Model
  • Tuple
    • Each row is known as a tuple
  • Columns
    • It represents the attributes of the relation
    • Each attribute, there is a permitted value, called domain of the attribute.
  • Cardinality
    • Total number of tuples in a given relation.
  • Degree of table
    • Number of attributes/columns in a given table/relation.
[Read More]

02-DBMS | ER-Model

Data Model(ER-Model and ER-Diagram)

Data Model

  • Provides a way to describe the design of a DB at logical level.
  • Underlying the structure of the DB is the Data Model
    • A collection of conceptual tools for describing data, data relationships, data semantics & consistency constraints.
    • E.g: ER model, Relational Model, object-oriented model, object-relational data model etc.
  • Collection of conceptual tools for describing data, data relationships, data semantics, and consistency
[Read More]

01-DBMS | Introduction

Introduction, Three Schema Architecture, DBMS Architecture, Database Languages

What is Data?

  • Data is a collection of raw, unorganized, unstructured facts and details
  • Like text, observations, figures, symbols, and descriptions of things etc.
  • Data doesn’t have any meaning unless processed.
  • Types of Data
    • Quantitative
      • Numerical form
      • Weight, volume, cost of an item.
    • Qualitative
      • Descriptive, but not numerical
      • Name, gender, hair color of a person.
[Read More]