Monday, March 27, 2017

Week 7: Day 30-34 - Postgres Server Pt. 2

Monday:
Today, I created a bash script for Marco for the Taco Truck project. Then I helped Edson move a bunch of files to a different directory. Afterwards, I started learning some Postgres commands regarding users and privileges. To create a new user, you have to do:

CREATE USER (username) WITH PASSWORD '(password)';

and you can delete just as easily doing:

DROP USER (username);

to give the user superuser (administrative) status do:

ALTER USER (username) WITH SUPERUSER;

to set a password:

ALTER USER (username) WITH PASSWORD '(password)';

To connect to your actual server, you do:

psql -h (ip address/hostname) -p 5432 -U (user) -d (name of database)

Tuesday:
Today, I wanted to work on the Postgres Server, unfortunately Mr. Elkner gave me a wacky password instead of just "password" like I suggested. So I was not able to log into the server. So instead, I added a new column to the Taco Truck table, and continued learning about querying in subqueries in SQL through Khan Academy, then did the follow up activity.

Wednesday:
Today, I had Mr. Elkner give me the password so I could get in to change it. I did that, and now I'm in and can learn how to use Postgresql.

Thursday:
Today, I helped Edzon with a Python syntax issue. Then Ian wanted to convert an image into a banner, and I helped him do that. Afterwards, Mr. Elkner assigned me to a new project. I started designing a database for the Virginia CS Standards. It's going to be a many-to-many relationship. You can check my github to see what work I've been doing on that.

Friday:
Today, I continued working on getting the many-to-many relationship to work on the Virginia CS Standards thing. It's been very tough to figure out, but I learned from this on how foreign keys work, and this reinforced it with an example in sqlite which joins two table for a many to many relationship. This is exactly what I emulated for the standards which I had to organize.

1 comment:

  1. When I tried to create a map_va database using the same process I had used to create map_arlington, the data import process failed. I think the dataset is too big. We don't really need all the OSM data, so I plan to just load the Precints and then to wait for Peter to give us the Python scripts to gather other relevant data this Thursday.

    ReplyDelete