Aman Khan | Data Engineering (@amankhan_data) header
Aman Khan | Data Engineering (@amankhan_data) profile picture

Research Intern · Ex-Data Engineer @ Infosys · Now MSc AI @ BTU Cottbus. Pipelines, warehousing, and what's underneath the SQL

Berlin, Germany
Joined May 2017
Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)Photo by Aman Khan | Data Engineering (@amankhan_data)
wrapped up my data warehouse project: a star schema pulling sales from 3 branch dbs into one model, loaded with an etl i wrote in oracle pl/sql. deduped ~47k customer records, turned 35 duplicate products into the real 29. diagram + repo below. github.com/aman7kh8an6/drink… #Data #DWH
3
142
The title "Hist-Tree: Those Who Ignore It Are Doomed to Learn" is one of the best paper titles in databases, and the paper backs it up.
In 2018, a paper made a wild claim: a B-Tree is just a model. It takes a key and predicts a position. So why not replace it with a neural net? In 2021, another paper answered: “Those who ignore it are doomed to learn.” I presented that one in my MSc seminar. Here’s the fight🧵
1
21
In 2018, a paper made a wild claim: a B-Tree is just a model. It takes a key and predicts a position. So why not replace it with a neural net? In 2021, another paper answered: “Those who ignore it are doomed to learn.” I presented that one in my MSc seminar. Here’s the fight🧵
1
1
2
123
2/ Kraska et al.’s idea: if you know the shape of your key distribution (the CDF), you can predict where any key sits in a sorted array. The model is the index. Smaller than a B-Tree, often faster. The database world went nuts.
1
2
20
Curious: how many of you have built a system from scratch to understand how it works underneath? Not just used a database, but built a tiny one. Not just used an HTTP server, but implemented one. Not just used a cache, but built one.
1
30
In Oracle, when a row grows and no longer fits its block, the row moves — but the ROWID doesn't. The old block keeps a stub pointing to the new location. No index breaks. You just pay an extra I/O on every read of that row until the table is reorganized. Small storage detail.
2
65
1/ For 3 years I wrote SQL against Oracle. ROWID was just there useful, reliable, never in the way. That's what a good abstraction does. You never need to look underneath it I looked underneath it. Its the thing that makes indexes possible How a database actually stores a row:
1
99
2/A database never reads "a row" from disk. Storage moves in fixed-size blocks. Oracle 8KB. Postgres 8KB. InnoDB 16KB. So the unit is the page, and one page holds many rows. Which creates the whole problem: given 8KB of bytes, where does one row end and the next begin?
1
34
"Data chaos" isn't messy data. It's this chain: You store the same fact in many places (redundancy) → they drift apart (inconsistency) → and your question needs all of them at once (distribution) The scary part isn't wrong answers. It's plausible wrong answers. #data #dwh
2
59
The raw data itself was messed up. One branch had a price stored as '.0.71' (yes, two decimal points). Another had quantities written out as words like 'three' or 'four' instead of numbers. wrote small functions just to clean this before doing anything else with it. #Data #DWH
1
64
Next step after the schema was loading real data into it. First real problem: Same customer registered in 3 different branches, but each branch gives them a different internal id. Ids were useless for finding duplicates, so matched people by name + full address instead. #Data
2
45
haven't posted here in a while, let me start sharing what i've been building again. for my data warehouse project I designed a star schema (mE/R model) with customers, products, branches and time all rolling into one fact table. more on this over the next few days. #Data #DWH
3
139
Why matrix decomposition is a superpower for huge data 👇 Matrix decomposition is powerful for huge data because it helps you reduce size, cost, and complexity without losing key information. Here’s why it matters 👇🧵
1
1
78
1️⃣ Dimensionality reduction Large datasets often have thousands of features. Decompositions like SVD / PCA project data into fewer dimensions while keeping most of the signal. → Less memory → Faster training → Better generalization
1
12
Had an interview with Snowflake for a Software Engineer Intern position in Berlin 🇩🇪. Didn’t crack it this time 🥲, but gained valuable experience and learned a lot through the process. Need to keep improving and try again! 🚀💪 #TechJourney #KeepGrowing
3
6
224
=> Perceptron vs Neuron Perceptron is the OG: • Uses a step function • Can't solve non-linear problems • Single-layered Modern Neuron: • Uses ReLU, sigmoid, etc • Support deep networks • Can model complex pattern The neuron evolved, but it started with the Perceptron #DL
1
186
make_regression → a scikit learn library, your go to for cooking up fake data for linear regression. Control features, samples, noise — perfect for testing models. Fake it till you train it. 😎 #MachineLearning #scikitLearn #Python
1
85
Learning Gradient Descent - step by step toward the global minima 📉 It’s how machines learn by minimizing error, one tiny move at a time. #AI #MachineLearning #GradientDescent
1
90
🧠 Exploring PCA through Image Compression Principal Component Analysis is a dimensionality reduction technique that identifies the most significant directions (principal components) in data. It’s used in ML and image processing to reduce data size while retaining essential info
1
1
107
📸 In this project, I: - Broke a grayscale image into small 8×8 pixel blocks - Flattened and centered each block to form a data matrix - Computed the covariance matrix of pixel values - Applied the Orthogonal Iteration algorithm (from scratch!) to find top eigenvectors
1
1
5
🚀 Just shared a PCA demo on Kaggle! Reduced features by more than 50% and used 200 high variance features and still got 95% accuracy 🎯 with 2D and 3D visualisation. Check it out: 🔗kaggle.com/code/amankhan98/p… #DataScience #PCA #MachineLearning #Kaggle
🔍 Principal Component Analysis (PCA) — Demystified with math! PCA reduces dimensionality by projecting data onto directions (axes) of maximum variance. It solves the eigenvalue problem: Av=λv
1
83