My Database Knowledge

This page demonstrates simple understanding of relational databases, querying, and backend data flow concepts commonly used in full stack applications. While this demo does not connect to a live database, all examples reflect real-world production patterns.

Example Database Schema

A common relational structure used in many applications included users and posts, connected through foreign key relationships.

        TABLE users
        - id (PRIMARY KEY)
        - username
        - email
        - created_at

        TABLE posts
        - id (PRIMARY KEY)
        - user_id (FOREIGN KEY → users.id)
        - title
        - content
        - created_at
        

Sample SQL Queries

Select users and their posts:

SELECT users.username, posts.title
FROM users
JOIN posts ON users.id = posts.user_id;
      

Insert a new user:

INSERT INTO users (username, email)
VALUES ('douglas', 'douglas@example.com');
      

Update a post:

UPDATE posts
SET title = 'Updated Title'
WHERE id = 1;           
        

Backend Integration Concept

In a production environment, these SQL operations would be executed by a backend service or serverless function. The frontend would communicate with the backend via RESTful API endpoints, keeping database logic secure and abstracted.

  • Frontend → REST API request
  • Backend → SQL query execution
  • Database → Structured data response
  • Backend → JSON response to client