Partner up, and on your whiteboard tables, write out schema declarations for Animals and Employees, discussing what datatype and contraints best suit each attribute. Once you feel confident in your schemas, type them up in a .sql
file and add it to your wdi
database.
Design a schema such that each animal has the following attributes:
species
sex
is_carnivore
Design a schema such that each employee has the following attributes:
name
age
title
badge_number
CREATE TABLE jedis (
id SERIAL PRIMARY KEY,
name VARCHAR(50) NOT NULL,
lightsaber_color VARCHAR(50) NOT NULL,
years_training INTEGER NOT NULL,
social_security VARCHAR(12) UNIQUE,
tempted_by_dark_side BOOLEAN NOT NULL,
temptation VARCHAR(50) NOT NULL
);