CSC 315 - Project 11 Bryan Wieschenberg, Tra-Mi Cao, Praneel Pothukanuri
This database holds information of goats, along with their traits and activities. In our project, we aim to answer 7 questions about goats and their birth weights using our views and queries, enabling the user to choose a variety of years, vaccines, and outputs for each question answered. The 7 questions are:
- Birth weight comparisons for each year the data is available.
- Lowest average, median average, high average and overall average.
- The average age of the does that gave birth that year.
- Average wt. of twins, triplets and singles – comparison.
- Birth weight differences between first year moms and older moms.
- Kid number differences between first time moms and older moms.
- Dam vaccines' effect on their kids' birth weight.
Here is how to create and populate our database and for it to be used in the graphic user interface:
- Create a database in within a PostgreSQL terminal using the command 'createdb Group11DB'
- Make sure all files are downloaded and all located in one central directory, as well as the 5 data files
- Ensure you're in the correct directory where all the files are located, navigating with 'cd {directory}' and 'ls' to see the contents of that directory to make sure you're correctly located
- Go into the database using the command 'psql Group11DB'
- Use the command '\i schema.sql' to create our schema's tables and populate them.
- Using our views.sql file, copy and paste every view into the database to create each view necessary for the GUI
- Once all views are created, you may exit the database using '\q'
- Out of the database, type into the terminal 'flask run', you should receive a message saying the Flask app is running
- Go into a browser and type at the top the link 'localhost:5000'
- You have now loaded the Flask app and are able to fetch and display database queries in the GUI. Congratulaions!