(NuC) Database Manipulation: SQL
CREATE
INSERT
Each time INSERT is implemented — “id SERIAL” will increment column integer.
JEEP value need to be integer, peep the CREATE TABLE.
ALTER TABLE
Used to modify table
ERROR: Table already has rows present, we need to reconcile what the wheel_count should be for existing rows.
default value
overriding default values
Notice:
Year was not included in INSERT parameter, therefor is NULL value.
UPDATE
DELETE AND DROP
On delete
The problem with delete:
Solutions
Cascade
SET NULL
SET DEFAULT
Which is most reasonable?
There will be tradeoffs with each. Although cascade is the most reasonable in this scenario.
Other options: