A table PET stores, for each of 120 pets: PetID, Name, Species, Weight (for example 4.5) and Vaccinated (yes or no). Which field is the primary key, and which data types suit Weight and Vaccinated?
- Name and Species can repeat, so they cannot identify one pet. PetID is different for every pet.
- Weight has a decimal part, so it needs the real data type, not integer.
- Vaccinated has only two possible values, so Boolean fits.
- The table has 5 fields and 120 records.
Answer: Primary key: PetID. Weight: real. Vaccinated: Boolean.