Skip to content

Database schema for a swiss style tournament using postgresql

License

Notifications You must be signed in to change notification settings

ajack13/tournament

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tournament - [ajay]

Database schema for a swiss style tournament

Pre-requisites

  1. Python

  2. PostgreSQL

  3. python-psycopg2

Required Libraries and dependencies

  1. Git (optional)

Installation

download zip

Unzip the file

$ cd tournament

or

Clone github repository

Open the shell in mac/linux or command prompt in windows and navigate to the folder you wnat to clone the repository

Make sure you have installed git

	$ git clone https://github.com/ajack13/tournament.git

this should clone the repository to the folder

Files


tournament.sql

Contains the queries for creating tables and views for PostgreSQL

tournament.py

Contains python defenitions for the following db operations

  • DB connection
  • Register Players
  • Delete Players
  • Swiss style parings
  • Player Standings (Points table)
  • other utilities

tournmarnt_test.py

Test cases for the queries

Import and create database


  1. Open the terminal (command prompt or git bash in windows) and enter the psql console
    $ psql
  1. To import the sql schema ,create database and connect to it enter this in your terminal
    $ i\ yourFileDirectories/tournament.sql 

Run Test cases


  1. Navigate to the folder using command promt if you are in windows or the shell if you are using a mac or linux
  2. Run the file tournament_test.py using python by typing the following command to run through the test cases
    $ cd tournament
	$ python tournament_test.py

Version

1.1

Tech

  • Sublime text - Text editor
  • PostgreSQL
  • python

About

Database schema for a swiss style tournament using postgresql

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages