We are going to create a simple database that uses some of the data from this website. This post will use the data from Wyoming, located here.
The website contains the following columns from their database:
- Scientific Name
- Photo
- Map
- Sound
- IUCN Red List Status
- Vernacular Name
- Family
Our database table will only utilize four of the columns:
- Scientific Name
- IUCN Red List Status
- Vernacular Name
- Family
Here will be our database structure:
Database: Amphibians
Table(s): Wyoming
First, lets create the database and table. We will only insert a few of the records:
- CREATE DATABASE Amphibians;
- GO
- USE Amphibians;
- GO
- CREATE TABLE Wyoming
- (
- amph_ID INT IDENTITY(1,1) PRIMARY KEY
- , scientific_Name VARCHAR(100)
- , rl_Status VARCHAR(75)
- , vernacular_Name VARCHAR(100)
- , family VARCHAR(100)
- );
- INSERT INTO Wyoming
- (
- scientific_Name
- , rl_Status
- , vernacular_Name
- , family
- )
- VALUES
- (
- 'Bufo baxteri'
- , 'Extinct in the Wild (EW)'
- , 'Wyoming Toad'
- , 'Bufonidae'
- );
- INSERT INTO Wyoming
- (
- scientific_Name
- , rl_Status
- , vernacular_Name
- , family
- )
- VALUES
- (
- 'Bufo boreas'
- , 'Near Threatened (NT)'
- , 'Western Toad'
- , 'Bufonidae'
- );
- INSERT INTO Wyoming
- (
- scientific_Name
- , rl_Status
- , vernacular_Name
- , family
- )
- VALUES
- (
- 'Bufo cognatus'
- , 'Least Concern (LC)'
- , 'Great Plains Toad'
- , 'Bufonidae'
- );
- INSERT INTO Wyoming
- (
- scientific_Name
- , rl_Status
- , vernacular_Name
- , family
- )
- VALUES
- (
- 'Bufo hemiophrys'
- , 'Least Concern (LC)'
- , 'Canadian Toad'
- , 'Bufonidae'
- );
If you run a select all query on the new Amphibians table, you should get this result:
---------------------------------------------------------------------------------------
amph_ID scientific_Name rl_Status vernacular_Name family
1 Bufo baxteri Extinct in the Wild (EW) Wyoming Toad Bufonidae
2 Bufo boreas Near Threatened (NT) Western Toad Bufonidae
3 Bufo cognatus Least Concern (LC) Great Plains Toad Bufonidae
4 Bufo hemiophrys Least Concern (LC) Canadian Toad Bufonidae
No comments:
Post a Comment