groups table

The groups table in the Social Media Database Schema schema has 8 columns, keyed by id, with 1 foreign key to users. 2 columns in posts and group_members reference it.

Columns (8)

Columns of the groups table
ColumnTypeConstraintsDescription
iduuidprimary key
namevarchar(120)not null
slugvarchar(140)unique, not null
descriptionvarchar(1000)
privacygroup_privacynot null
owner_iduuidnot null, references users.id
member_countintegernot null
created_attimestamptznot null

Indexes (1)

  • (privacy, member_count)

Relationships