Database Storage Structures and Index Management Techniques
Database Storage Structures
There are several methods for storing user data in a database, each optimized for different performance and scalability requirements.
Regular Tables
A regular table (generally referred to as a “table”) is the most commonly used form of storing user data.
- The database administrator has very limited control over the distribution of rows in an un-clustered table.
- Rows can be stored in any order depending on the activity on the table.
Partitioned Tables
A partitioned table enables
Read MoreData Structuring, Acquisition, Cleaning, and ETL Cheatsheet
Module 1 Cheatsheet — Foundations, Acquisition, DOM/XPath, Structuring
1) What “Big Data” means:
No single size cutoff. Think:
Volume (lots of rows/large objects), Variety (heterogeneous), Velocity (fast-changing), Veracity (quality).Implication: choose tools/storage/pipelines that match data scale and shape.
2) Three canonical encodings:
Tables / Relations / DataFrames
Heterogeneous columns; ideal for SQL/Pandas joins, filters, aggregations.
Arrays / Matrices / Tensors
Uniform numeric cells;
Read MoreMastering SQL: Practical Database Design and Query Examples
SQL Database Management: Supplier and Product Inventory
Defining the Inventory Schema (DDL)
We begin by setting up the database structure for tracking suppliers and their products. Note the use of PRIMARY KEY, FOREIGN KEY, and CHECK constraints for ensuring data integrity.
Supplier Table Creation
CREATE TABLE Supplier (
SupplierID INT PRIMARY KEY,
Name VARCHAR(100) NOT NULL,
City VARCHAR(50)
);Product Table Creation
CREATE TABLE Product (
ProductID INT PRIMARY KEY,
Name VARCHAR(100) Read More
Programming Language Concepts: Binding, Scope, and Data Structures
Binding, Typing, and Namespaces
A binding is an association between an entity and an attribute, such as between a variable and its type or value, or between an operation and a symbol.
Variable Scope: Static vs. Dynamic
Variable Scope is the range of statements in which the variable is visible. A variable is visible in a statement if it can be referenced or assigned in that statement.
- Static Scoping: The scope of a variable is determined prior to program execution and remains unchanged throughout (can
Fundamentals of Algorithm Design, Analysis, and Complexity Theory
Iterative Algorithms: Definition and Structure
An iterative algorithm repeatedly executes a set of instructions using loops (for, while, do-while) until a certain condition is satisfied. Instead of solving a problem directly in one step, the solution is approached gradually by repeating computations and updating variables.
Iterative algorithms rely on repetition (iteration) and are widely used for problems involving repeated calculations, searching, and optimization. Examples include Linear Search,
Read MoreC Code for Knapsack, MST, and Shortest Path Algorithms
1. Fractional Knapsack Problem (Greedy Approach)
This implementation solves the Fractional Knapsack Problem using a Greedy Approach. Items are sorted based on their profit-to-weight ratio to maximize the total profit within the given capacity.
C Implementation
#include <stdio.h>
#include <stdlib.h>
struct Item {
int weight, profit;
float ratio;
};
// Comparison function for qsort: sorts items by ratio in descending order
int compare(const void *a, const void *b) {
struct Item Read More
