btholt / btholt/complete-intro-to-sql
Bug in the description of the `UNIQUE` constraint in the Constraints section
- Dominant language
- JavaScript
- Stars
- 451
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
In the Constraints section the following is stated:
> UNIQUE is another constraint that dictates that this column must be unqiue amongst all other columns
I don't think this is accurate, or at least I feel this is easy to misinterpret. According to section [5.4.3. Unique Constraints](https://www.postgresql.org/docs/14/ddl-constraints.html#DDL-CONSTRAINTS-UNIQUE-CONSTRAINTS) of the PostgreSQL (version 14) manual
> Unique constraints ensure that the data contained in a column, or a group of columns, is unique among all the rows in the table
So, to my understanding, the `UNIQUE` constraint does _not_ constraint a column (or group of columns) relative to "all the other columns" but instead it constraint the values that a column (or group or columns) can have relative to the values in that column for all the rows in the table.
Contributor guide
No contributing guide indexed for this repository
Research direction
Find the Constraints section in the course materials and compare its UNIQUE description with PostgreSQL 14's Unique Constraints documentation. Update the wording so it accurately describes uniqueness across rows for a column or group of columns, then review the rendered section for accuracy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100