home.social

#primarykey — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #primarykey, aggregated by home.social.

  1. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  2. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  3. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  4. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  5. # #dt260208
    # #sql
    # #primarykey
    # #foreignkey
    # #SQLite

    I had chatgpt refactor the bookbiz database schema (from PracticalSQL book 2nd ed). It added primary and foreign keys. I then had it refactor for SQLite specifically.

    chatgpt.com/share/69894b9c-b94

    ...

    Highlights:

    1. SQLite-Idiomatic Schema (Clean Rewrite)
    Global settings (critical in SQLite)
    PRAGMA foreign_keys = ON;
    PRAGMA journal_mode = WAL;
    PRAGMA synchronous = NORMAL;

  6. Auto-Increment IDs Have GAPS Forever?!

    IDs are BROKEN! Failed INSERT consumes the auto-increment ID! User #1, skip #2, User #3! Your IDs have permanent GAPS! This breaks ID-based logic! Watch this chaos!

    #sql #sqlbug #autoincrement #primarykey #idgaps #failedinsert #sqlfails #productionbug #sqlshorts #sqlwtf #identitycolumn #dataintegrity

    youtube.com/watch?v=qF3obGJL_MY

  7. Auto-Increment IDs Have GAPS Forever?!

    IDs are BROKEN! Failed INSERT consumes the auto-increment ID! User #1, skip #2, User #3! Your IDs have permanent GAPS! This breaks ID-based logic! Watch this chaos!

    #sql #sqlbug #autoincrement #primarykey #idgaps #failedinsert #sqlfails #productionbug #sqlshorts #sqlwtf #identitycolumn #dataintegrity

    youtube.com/watch?v=qF3obGJL_MY

  8. Auto-Increment IDs Have GAPS Forever?!

    IDs are BROKEN! Failed INSERT consumes the auto-increment ID! User #1, skip #2, User #3! Your IDs have permanent GAPS! This breaks ID-based logic! Watch this chaos!

    #sql #sqlbug #autoincrement #primarykey #idgaps #failedinsert #sqlfails #productionbug #sqlshorts #sqlwtf #identitycolumn #dataintegrity

    youtube.com/watch?v=qF3obGJL_MY

  9. Auto-Increment IDs Have GAPS Forever?!

    IDs are BROKEN! Failed INSERT consumes the auto-increment ID! User #1, skip #2, User #3! Your IDs have permanent GAPS! This breaks ID-based logic! Watch this chaos!

    #sql #sqlbug #autoincrement #primarykey #idgaps #failedinsert #sqlfails #productionbug #sqlshorts #sqlwtf #identitycolumn #dataintegrity

    youtube.com/watch?v=qF3obGJL_MY

  10. Auto-Increment IDs Have GAPS Forever?!

    IDs are BROKEN! Failed INSERT consumes the auto-increment ID! User #1, skip #2, User #3! Your IDs have permanent GAPS! This breaks ID-based logic! Watch this chaos!

    #sql #sqlbug #autoincrement #primarykey #idgaps #failedinsert #sqlfails #productionbug #sqlshorts #sqlwtf #identitycolumn #dataintegrity

    youtube.com/watch?v=qF3obGJL_MY

  11. Django 5.2 支援 composite primary key

    看到 Django 5.2 的公告,裡面列出了比較重大的改變,其中一個注意到的是支援 Composite (Compound) Primary Key 了:「Django 5.2 released」,完整的 release notes 則是在「Django 5.2 release notes」這邊可以看到。 就是因為這些 ORM library 不支援 compsite primary key,所以才會有 best (?) practice 要求每個表格都要有 primary key,而且是單一欄位... 大家應該都習以為常了,怎麼會突然在 2025 年才想要支援? …

    blog.gslin.org/archives/2025/0

    #composite #compound #database #db #django #library #orm #pk #PrimaryKey #rdbms

  12. I love it when an #RDB #database sports a #primaryKey in one table that doesn't have a corresponding column anywhere else. That's just great #dataModeling right there.

    #dataAnalysis #SQL