Skip to content
Shop

Learn by Building: 4 CRUD Apps to Help You Master Database Design

As a beginner, creating CRUD (Create, Read, Update, Delete) apps can be an excellent way to learn about database management and software development. Here are the best four CRUD apps to create, starting with simple ones and gradually adding complexity.

1. Todo App

The Todo App is an ideal first project for beginners because it requires only one data model: Todo. This means we don't have to worry about relationships between tables.

Todo

A single task to do.

columntype
idinteger (primary key)
titletext
descriptiontext
completedboolean

CRUD Operations:

  1. Create: Add a new todo item with title, description, and completed status.
  2. Read: Retrieve all todo items or retrieve a specific todo item by ID.
  3. Update: Edit the title, description, or completed status of an existing todo item.
  4. Delete: Remove an entire todo item.

The Todo App is a great starting point because it teaches us how to work with a single table and basic CRUD operations.

2. Blog App

The Blog App introduces one-to-many relationships between User and Post.

User

A single task to do.

columntype
idinteger (primary key)
nametext
emailtext
completedboolean

Post

A single task to do.

columntype
idinteger (primary key)
titletext
contenttext
user_idinteger

CRUD Operations:

  1. Create:
    • User creation
    • Post creation with associated user ID.
  2. Read:
    • Retrieve all posts or retrieve a specific post by ID.
    • Retrieve a user's posts.
  3. Update:
    • Update a post's title, content, or user ID.
  4. Delete:
    • Remove an entire post.

The Blog App teaches us how to work with multiple tables and one-to-many relationships between them.

3. Blog with Comments

This app introduces many-to-many relationships between UserPost, and Comment.

User

A single task to do.

columntype
idinteger (primary key)
nametext
emailtext
completedboolean

Post

A single task to do.

columntype
idinteger (primary key)
titletext
contenttext
user_idinteger (foreign_key)

Comments

A single task to do.

columntype
idinteger (primary key)
contenttext
user_idinteger (foreign_key)
post_idinteger (foreign_key)

CRUD Operations:

  1. Create:
    • User creation
    • Post creation
    • Comment creation with associated post and user IDs.
  2. Read:
    • Retrieve all posts or retrieve a specific post by ID.
    • Retrieve a user's posts or comments on their posts.
  3. Update:
    • Update a post's title, content, or user ID.
    • Update a comment's content.
  4. Delete:
    • Remove an entire post.

The Blog with Login app teaches us how to work with many-to-many relationships and perform CRUD operations across multiple tables.

4. Blog with Comments & User Metadata


This app introduces one-to-one, one-to-many, and many-to-many relationships between UserPostComment, and UserDetails.

User

A single task to do.

columntype
idinteger (primary key)
nametext
emailtext
completedboolean
user_detailsinteger (foreign_key)

Post

A single task to do.

columntype
idinteger (primary key)
titletext
contenttext
user_idinteger (foreign_key)

Comments

A single task to do.

columntype
idinteger (primary key)
contenttext
user_idinteger (foreign_key)
post_idinteger (foreign_key)

UserDetails

A single task to do.

columntype
idinteger (primary key)
user_idinteger (foreign_key)
biotext
profile_picturetext

CRUD Operations:

  1. Create:
    • User creation
    • Post creation with associated user ID.
    • Comment creation with associated post and user IDs.
  2. Read:
    • Retrieve all posts or retrieve a specific post by ID.
    • Retrieve a user's details, posts, or comments on their posts.
  3. Update:
    • Update a post's title, content, or user ID.
    • Update a comment's content.
    • Update a user's bio, profile picture, or other user metadata.
  4. Delete:
    • Remove an entire post.

The Blog with Login & User Metadata app teaches us how to work with complex relationships and perform CRUD operations across multiple tables.

Summary

In summary, these four CRUD apps help beginners learn about database management, software development, and software engineering principles in a gradual manner. Starting with simple Todo App and moving to more complex projects like the Blog with Login & User Metadata app helps build skills and confidence.