     UNIQUE (username)
 );
 
--- Organizations Table
--- Organizations on campus. Used for positions, etc.
--- Examples: Blacker Hovse, IHC, CRC
-CREATE TABLE organizations (
-    org_id   INT         NOT NULL AUTO_INCREMENT,
-    org_name VARCHAR(32) NOT NULL,
-    type     VARCHAR(32) DEFAULT NULL,
-    PRIMARY KEY (org_id),
-    UNIQUE (org_name)
+-- Groups Table
+-- Groups of members. Used for mailing lists, etc.
+-- Groups are used for any internal/external groupings of users.
+-- Used for organizations on campus
+-- Examples: Blacker Hovse, IHC, CRC, ug-list, ug-2020
+CREATE TABLE groups (
+    group_id                INT          NOT NULL AUTO_INCREMENT,
+    group_name              VARCHAR(32)  NOT NULL,
+    group_desc              VARCHAR(255) DEFAULT NULL,
+    type                    VARCHAR(32)  DEFAULT NULL,
+    anyone_can_send         BOOLEAN      DEFAULT FALSE, -- This flag controls
+                                                        -- whether or not 
+                                                        -- anyone can send
+                                                        -- emails to the group
+    newsgroups              BOOLEAN      DEFAULT FALSE, -- Controls if this is
+                                                        -- an email group
+    visible                 BOOLEAN      DEFAULT FALSE, -- Controls if anyone
+                                                        -- anyone can see this
+                                                        -- group
+    admin_control_members   BOOLEAN      DEFAULT TRUE,  -- Toggles whether or
+                                                        -- not admins control
+                                                        -- Group membership
+    PRIMARY KEY (group_id),
+    UNIQUE (group_name)
 );
 
--- Organization Positions Table
+-- Positions Table
 CREATE TABLE positions (
-    org_id   INT         NOT NULL,
+    group_id INT         NOT NULL,
     pos_id   INT         NOT NULL AUTO_INCREMENT,
     pos_name VARCHAR(32) NOT NULL,
     PRIMARY KEY (pos_id),
-    FOREIGN KEY (org_id) REFERENCES organizations(org_id)
-);
-
--- Permissions Table
--- Table of types of permissions a position holder could have
-CREATE TABLE permissions (
-    perm_id   INT          NOT NULL AUTO_INCREMENT,
-    perm_name VARCHAR(32)  NOT NULL,
-    perm_desc VARCHAR(255),
-    PRIMARY KEY (perm_id),
-    UNIQUE (perm_name)
-);
-
--- Permission to Position Table
-CREATE TABLE position_permissions (
-    org_id  INT NOT NULL,
-    pos_id  INT NOT NULL,
-    perm_id INT NOT NULL,
-    PRIMARY KEY (org_id, pos_id, perm_id),
-    FOREIGN KEY (org_id, pos_id) REFERENCES positions(org_id, pos_id)
+    FOREIGN KEY (group_id) REFERENCES groups(group_id)
 );
 
 -- Position to Member Table

-- House View
-- Because houses are used so much, make a view separate from the organizations
-- table.
CREATE VIEW org_houses AS (
    SELECT org_id, org_name FROM organizations WHERE type = 'house'
);

-- House Members View
-- Because house membership is used so much, make a view separate from the
-- positions table.
CREATE VIEW org_house_membership AS (
    SELECT user_id, org_id, pos_id
    FROM org_houses NATURAL JOIN positions NATURAL JOIN position_holders
    WHERE UPPER(pos_name) = UPPER('Full Member') 
        OR UPPER(pos_name) = UPPER('Social Member')
);

-- Groups Table
-- Groups of members. Used for mailing lists, etc.
-- Groups are very similar to organizations, but more for internal groupings
-- of users.
CREATE TABLE groups (
    group_id                INT          NOT NULL AUTO_INCREMENT,
    group_name              VARCHAR(32)  NOT NULL,
    group_desc              VARCHAR(255) DEFAULT NULL,
    anyone_can_send         BOOLEAN      DEFAULT FALSE, -- This flag controls
                                                        -- whether or not 
                                                        -- anyone can send
                                                        -- emails to the group
    newsgroups              BOOLEAN      DEFAULT FALSE, -- Controls if this is
                                                        -- an email group
    visible                 BOOLEAN      DEFAULT FALSE, -- Controls if anyone
                                                        -- anyone can see this
                                                        -- group
    admin_control_members   BOOLEAN      DEFAULT TRUE,  -- Toggles whether or
                                                        -- not admins control
                                                        -- Group membership
    PRIMARY KEY (group_id),
    UNIQUE (group_name)
);

-- Group Members Table

    FOREIGN KEY (group_id) REFERENCES groups(group_id)
);

-- Group Positions Table
CREATE TABLE group_positions (
    pos_id      INT NOT NULL,
    group_id    INT NOT NULL,
    send        BOOLEAN DEFAULT FALSE, -- Toggles whether or not this position
