CodeGym
AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • Creating the students table and linking it to the courses table

    SQL SELF
    Level 20, Lesson 0
    A detailed step-by-step guide on how to create the students and courses tables in a database, and how to set up relationships between them using foreign keys. We'll break down SQL commands, table structure, and give you query examples to help you lock in the material.
    Available
  • Creating the enrollments table to link students and courses

    SQL SELF
    Level 20, Lesson 1
    In this lecture, you'll learn how to set up a MANY-TO-MANY relationship between students and courses using an intermediate table called enrollments in PostgreSQL. We'll break down the table structures, check out some SQL query examples, insert data, and look at common mistakes when working with foreign keys.
    Available
  • Data Integrity Check

    SQL SELF
    Level 20, Lesson 2
    Learn how foreign keys in PostgreSQL keep your data consistent, stop mismatched records from popping up, and help you maintain the logic between your tables. We’ll look at examples, common mistakes, and how to handle them.
    Available
  • Deleting and Updating Data with Foreign Keys in Mind

    SQL SELF
    Level 20, Lesson 3
    Learn how to properly delete and update data in relational databases when foreign keys are involved. We'll break down ON DELETE and ON UPDATE options, check out some cascade operation examples, and look at common mistakes when working with integrity constraints.
    Available
  • Common Mistakes When Working with Foreign Keys

    SQL SELF
    Level 20, Lesson 4
    Check out the most common mistakes when working with foreign keys in PostgreSQL and other DBMS: from missing indexes to breaking data integrity. Learn how to avoid them and make your database reliable and fast.
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym