Posts

Showing posts from September, 2026

SQL Constraints

SQL Constraints Primary Key Constraint Step 1:   (first ensure the field is NOT NULL) alter table tablename  alter column column int not null   Step 2: ALTER TABLE tablename ADD CONSTRAINT constraintname PRIMARY KEY (fieldname ); Example: Alter table Employees   add constraint PK_EmpID  PRIMARY KEY ( EmployeeID ) Foreign key constraint alter table Orders              -- table name add constraint FK_EID      – constraint name foreign key (ShipperID)     -- column that will become a foreign key references Shippers (ShipperID) -– table and column name to which it links   Default constraint Alter table Orders add constraint df_Constraintname default getdate() for orderdate   Check Constraint Alter table Products add constraint ch_price check (price >= 0)   To DROP a Constraint alter table products drop constraint ch_price  

What is Streamlit

Image
What is Streamlit Learn Python   Streamlit is a Python framework that lets you turn Python code into an interactive web application very quickly . The simplest mental model is: Streamlit = an easy way to build a web UI using Python, without needing to learn much HTML, CSS, or JavaScript. Example Learn Python Suppose you have a Python function that predicts house prices: def predict_price(size, bedrooms): return size * 3000 + bedrooms * 10000 With Streamlit, you can turn that into a little web app: import streamlit as st st.title("House Price Predictor") size = st.number_input("House size") bedrooms = st.number_input("Bedrooms") if st.button("Predict"): price = predict_price(size, bedrooms) st.write(f"Predicted price: £{price:,.0f}") The result is a webpage with: ┌─────────────────────────────────┐ │ House Price Predictor │ │ │ │ House size: [ 1200 ] │ │ ...

What is Apache Airflow

Image
What is Apache Airflow Learn Python Apache Airflow is an open-source platform for building, scheduling, and monitoring data workflows . Think of it as a tool that answers: “What should run, in what order, when should it run, and what happens if something fails?” Simple example Suppose a company has this daily data pipeline: Get data from API ↓ Clean the data ↓ Store it in a database ↓ Run analytics ↓ Send report Airflow can orchestrate all of those steps: ┌── Clean data ──┐ Get API data ┤ ├── Run analytics ── Send report └── Validate ────┘ It can run the workflow every day at 6 AM, retry failed tasks, and show you which tasks succeeded or failed. The key concepts 1. DAG (Directed Acyclic Graph) A DAG describes your workflow and its dependencies. For example: extract >> transform >> load This means: extract → transform → load 2. Tasks Individual pieces of work, such as: Run a Python function Execute SQ...

What is AWS

Image
Learn Python What is AWS   AWS (Amazon Web Services) is a cloud computing platform from Amazon. The simplest way to think about it is: AWS lets you rent computing infrastructure over the internet instead of buying and maintaining your own servers. Without AWS A company might need to buy: Physical servers ↓ Storage ↓ Networking equipment ↓ Data center ↓ Electricity + cooling ↓ IT team to maintain everything That's expensive and difficult to scale. With AWS You can rent these resources from AWS: AWS │ ┌─────────────┼─────────────┐ ↓ ↓ ↓ Computers Storage Databases EC2 S3 RDS │ │ │ └─────────────┼─────────────┘ ↓ Your application You pay for the resources you use rather than owning the physical infrastructure. Some important AWS services There are hundreds of AWS ...

What is Docker

Image
Python courses   What is Docker Docker is a tool that lets you package an application together with everything it needs to run and then run it consistently anywhere. The simplest mental model is: Docker = a standardized box for your application. The problem Docker solves Imagine you build a Python application on your laptop: Python 3.12 pandas 2.x requests PostgreSQL client some configuration It works perfectly. Then you give it to someone else, and they get: "It doesn't work on my machine." Maybe they have Python 3.10, a different library version, or a missing dependency. Docker helps solve this by packaging the environment: ┌─────────────────────────────┐ │ Docker Container │ │ │ │ Your application │ │ Python │ │ Libraries │ │ Configuration │ │ │ └─────────────────────────────┘ You can then run that container on another machine with much l...

What is Apache Spark

Image
Python courses What is Apache Spark Apache Spark is an open-source framework for processing large amounts of data quickly across multiple computers . A simple way to think about it: Spark is an engine for doing data processing at scale. A simple example Imagine you have 5 TB of customer transaction data and want to calculate total sales per customer. Processing it on one computer could be extremely slow. Spark can split the data across many machines: 5 TB of data │ ┌───────────┼───────────┐ ↓ ↓ ↓ Machine 1 Machine 2 Machine 3 │ │ │ Process Process Process its data its data its data │ │ │ └───────────┼───────────┘ ↓ Combine results ↓ Total per customer This is called distributed computing . What can Spark do? Spark can pe...