Explain the difference between a SQL commit and a SQL branch, and what LEFT JOIN and RIGHT JOIN do.
Provide a concise explanation using PostgreSQL terminology and SQL examples. Clarify that COMMIT is a transaction command and that branch is not standard SQL, then demonstrate both join directions with the supplied tables.
join_type, branch_id, branch_name, commit_id, and commit_message.join_type, then branch_id, then commit_id, with NULL values last.| Column | Type | Description |
|---|---|---|
| branch_idPK | INT | Identifier for a branch record |
| branch_name | VARCHAR(80) | Human-readable branch name |
| Column | Type | Description |
|---|---|---|
| commit_idPK | INT | Identifier for a commit record |
| branch_id | INT | Branch associated with the commit |
| commit_message | VARCHAR(160) | Short description of the commit |