We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time their we want to keep track of all the animals we have seen. For this, we need to create a database, as well as a small console application to help record what we see.
Objectives
Use an ORM to query against a database
Requirements
Additional Reading
NOTE: The Additional Resources section below is very helpful. Consider reading this after reading Explorer mode. Then make a plan for the assignment for digging in and writing code.
Explorer Mode (C#)
[ ] Create a database called SafariVacation
[ ] This will have 1 table called SeenAnimals that has the following columns
You did more here than required, which is awesome! However, some of the code needs to be adjusted. Come see me and we can clean it up and close the homework.
ORM Safari!
We are taking a surprise trip to the Savannah for a safari to see all sorts of exotic animals. During our time their we want to keep track of all the animals we have seen. For this, we need to create a database, as well as a small console application to help record what we see.
Objectives
Requirements
Additional Reading
NOTE: The Additional Resources section below is very helpful. Consider reading this after reading Explorer mode. Then make a plan for the assignment for digging in and writing code.
Explorer Mode (C#)
SafariVacation
SeenAnimals
that has the following columnsId
/id
(int)Species
/species
(string)CountOfTimesSeen
/count_of_times_seen
(int)LocationOfLastSeen
/location_of_last_seen
(string)pgcli
.CountOfTimesSeen
andLocationOfLastSeen
for an animalJungle
Desert
.CountOfTimesSeen
and get a total number of animals seenCountOfTimesSeen
oflions
,tigers
andbears
Explorer Mode (Ruby)
safari_vacation
animals
that has the following columnsid
(serial primary key)species
(string)seen_count
(int)last_seen_location
(string)pgcli
.animals
table and insert a few species of your own.display_all
to show all the animals.to then prompt the user for a species. Add
1to the
seen_count` for that species and display the new count.species
to prompt for a specific species and show the details for just that species.last_seen_location
to get the total
seen_count` of all animalsAdventure Mode (C#)
LastSeenTime
, with a type of DateTime. This will require you to add and run a new migration.Adventure Mode (Ruby)
last_seen_at
, with a type of DateTime.spot
andincrement
menu options to record the current time aslast_seen_at
Epic Mode
Additional Resources
Ruby
.NET
Here are the interesting commands you will need for tonight's assignment