General Information
Instructor:
Geoffrey Towell259 Park Science Building
526-5064
gtowell at brynmawr dot edu
http://cs.brynmawr.edu/~gtowell
Class:
Lecture Hours | MW 11:40am -- 1:00pm |
---|---|
Room | Park 245 |
Lab Hours | W 2:40 -- 4:00 If it is more convenient for you, lab may also be done W 1:10-2:30. (See my office hours below) |
Lab Room | Park 231 |
Office Hours | T 11am-Noon, W 1:10 -- 2:30 Also by appointment |
Zoom | Meeting code: 232 840 6920. Password: given in class, or ask me |
Course Description | This course will focus on the how to employ and deploy databases for use in real-world systems. Thus the course focuses on the practical aspects of using existing database management systems (DBMS) rather than the task of creating a new DBMS. Implementation tasks will, as a result, focus on why structures exist within databases and how those structures impact use. There will be extensive discussion and use of: relational and object-relational DBMS (using PostgreSQL); NoSQL databases (using MongoDB); text-only databases; and spreadsheet-based database-like applications. In addition we will discuss web-based approaches to data access both from the server side (node.js) and the client side (html and javascript). |
Computer Lab | Park 231 Instructions for using the lab computers Remote accessible lab computer status |
Text
Important Dates
- Jan 19, First Class
-
March 2Feb 28 Midterm - Exam period, Final Exam
Assignments
There will be several homework assignments. Homework will be electronically submitted.All assignments must be turned in on time. If there are compelling reasons why you cannot turn in an assignment on time, you must ask for permission at least 48 hours in advance of the due date.
Despite my best efforts, homeworks may have sections that are not quite correct. If you find an error, let me know. If I agree that the issue is an issue and you have told me of the issue at least 48 hours prior to the due date then I will give bonus points as follows:
3 points for the first issue reported 2 points for the second issue reported 1 point for the third issue reportedOrdering of the bonus points is based on date of email receipt. One bonus per person per assignment.
Homework 1 | Jan 27 | A lot of setup steps, making sure that everything works for you. | ||
Homework 2 | Feb 13 | Some fairly complex SQL queries | ||
Homework 3 | Feb 23 | Your own dataset and writeup thereon | ||
Homework 4 | April 6 | Putting your data into databases | ||
Homework 5 | April 28 | A web site for access to your data |
Labs
Labs will often look like programming assignments, just smaller. All labs can be done on the CS department lab machines or on personal machines (assuming you have installed the appropriate software.) Labs- Lab 1: Jan 19.
Access and login - Lab 2: Jan 26.
SQL queries on one table
Answers to the SQL queries - Lab 3: Feb 2 SQL queries, mostly on more than one table.
Answers to the SQL queries. - Lab 4: Feb 9 Making a home page
- Lab 5: Feb 16 Javascript!!!!!
- Lab 6: Feb 23 Node.js
- Lab 7: Mar 16 Normalizing a database
- Lab 8: Mar 23 CSV to PostgreSQL
family table creation
family filler in python - Lab 9: Mar 30 Mongo Queries
- Lab 10: April 6 Heap's Law
- Lab 11: April 13 Computing TF-IDF weights
- Lab 12: April 20 Using TF-IDF weights
Lectures
This course is intended to be fairly free-flowing with a lot of discussion. Therefore, I will not normally publish powerpoint lecture notes. I will try to restrict my commentary to topics covered in the text.
- Jan 19: Introductory remarks.
Slides used in class - Jan 24. Finish intro; relational algebra; PostgreSQL
Slides for class - Jan 26. SQL -- without joins
Slides for class
Rachel -- 3.3
Judy -- 3.4-3.5
Angie 3.6-3.8
SQL to list all columns of all tables in a DB. to use psql -d DATABASE < AllColumns.sql
Python to show size fo every table in DB to use python AllSizes.py DATABASE - Jan 31. SQL Joins
My slides
Inner Joins
Outer Joins
Lateral Joins - Feb 2: SQL from other places
My slides
ODBC using Go
Python to Postgres slides
Python program from class - Feb 7: URI and HTML
My slides
Issac's slides on URIs
Tova's slides on the basics of html - Feb 9: Javascript and the DOM
My slides
Joseph's slides on the DOM
Isabelle's slides on Javascript - Feb 14: Javascript, communications and first class functions
My slides
Paige's slides on long and short polling
Short Polling page
Long Polling page - Feb 16: Javascript,
My slides
look over shoulder
count down
replace with random string
Simpler closure and timer
ugly closure and timer
Trang on functions and triggers in SQL
Al on Closures
Anna on JSON and javascript manipulation - Feb 21: Javascript and Node.js
My slides
SQL for functions on last slide
Sara's node.js presentation
Node.js instructions for Hello world
Node.js instructions for long and short polling - Feb 23: Node.js
My slides
node.js for use
static html page served by node.js
node.js for get
static page with form doing a get
node.js for urlencoded post
static page with form doing post
node.js for POST with JSON
static page with javascript fetch sending JSON
Adrian's WebSockets slides
node.js for server sent events
html page for Server Seent events
a simple node server just to spit out static html pages.
html page for browser side of server sent events
node.js to actually run the websocket server
Slices for node - postgres connection
Node.js for ODBC communications with PostGreSQL
html page doing fetch and client side formatting
html page using forms. Response is a fully formatted new web page. - March 2 -- Making Databases in SQL
My slides This version of the slides has the query/view from class uncovered. We only got to slide 14. - March 14 -- More on database construction in Relations DBs
My slides
Menna on Normalizing databases - March 16 -- SQL advanced alternatives
My slides
Xinran on more data types
Olga on Json in Postgres
NoSQL databases - March 21 -- Mongo
Sarah's intro slides
William -- Create and drop in Mongo
Femi -- updating data in Mongo
Converting an rdbms to mongo - March 23 -- Mongo finding data
Menna -- Basic Mongo queries
Adrian -- Array Queries in Mongo
Paige -- Mongo Aggregation framework
Embedded documents and usage ideas - March 28 -- Mongo Review, Indexing
My mongo review slides
Iryna -- indexing RDBMS -- the underlying mechanics
Tova -- Indexing Mongo - March 30 -- Mongo from Python/Java, B+ Trees
mongo java
Keeton -- Mongo Python
Keeton -- Python code from demo
Ellie -- B+ Trees
Java jar file for Mongo
java jar file for PostGreSQL - April 6, Map-Reduce, Page Rank, Starting IR
Information Retrieval - Pt 1
Ellie F -- PageRank
Alec -- Map-Reduce - April 11, Text DB System, Transactions, IR pt 2
Information retrieval -- part 2
Mohamed -- Google structure -->
Angie -- concurrency handling part 1
Rachel -- concurrency pt 2
Isaac -- timestamp based transaction protocols - April 13, Concurrency, IR pt 3
Information retrieval -- part 2
Joseph -- Intro to Transactions
Trang -- Transactions Pt 2
- April 18, Spreadsheets as databases, Mongo and Node
accessing Mongo from Node.js
Anna -- spreadsheet intro
Xinran -- spreadsheet basics
Isabelle -- spreadsheets in practice
Isabelle -- VBA example - April 20, Parallelism and Databases, Evaluating IR, HW5 Sample
Evaluating IR
The next three links are for my very basic example of something that might be a start for homework 5. It sets up a node server with a static web page and a file of some javascript used by the web page. To use, put these three files all in the same directory. then start node (you will also need to change the port number) Node.js for HW5 sample. Includes a Postgres Query.
javascript function for example Note that the table formatter makes a very basic table that assumes that all the data items have exactly the same fields, that the table should show all of those fields, and that the column headers should be the field names.
starting page for example
The example, working
Course Policies
Communication
Attendance and active participation are
expected in every class. Participation includes asking questions,
contributing answers, proposing ideas, and providing constructive
comments.
Please
stay in touch with me, particularly if you feel stuck on a topic
or assignment and can't figure out how to proceed. Often a quick
e-mail, or face-to-face conference can reveal solutions
to problems and generate renewed creative and scholarly energy. It
is essential that you begin assignments early.
Grading
Grades will be awarded based on the number of points earned and according to the percentage breakdowns shown.Homework | |
Class Participation | 10% |
Lab | |
Midterms (1) | |
Class Presentations (2) | |
Presentation on Hw5 Project | 5% |
The mid-term exam will be on a class day and timed to take a class period. However, it will be self-scheduled. You may take it any time starting about 9am. You must complete it before midnight. All exams will be open everything. The only restriction is that you may not discuss the exam, in any way, with anyone until 24 hours after the exam (unless you are told otherwise).
Incomplete grades will be given only for verifiable medical
illness or other such dire circumstances. Incomplete grades must be approved through the Dean's
office.
ALL work submitted for grading should be entirely YOUR OWN (except for labs) and group work. Sharing of programs, code snippets, etc. is not permitted under ANY circumstances. That said, I encourage you to discuss assignments at an algorithmic level with other students. That is, talk about the problem, and general approaches to problems. Do not share or discuss actual code.
Links
- Kernighan's book on programming style. Most of the examples in this book are in languages rarely if ever used, but the lessons still apply.
Learning Accommodations
Students requesting accommodations in this course because of the impact of disability are encouraged to meet with me privately early in the semester with a verification letter. Students not yet approved to receive accommodations should also contact Deb Alder, Coordinator of Accessibility Services, at 610-526-7351 in Guild Hall, as soon as possible, to verify their eligibility for reasonable accommodations. Early contact will help avoid unnecessary inconvenience and delays.This class may be recorded.
Creating a Welcoming Environment
All members of the Instruction Staff are dedicated to the cause of improving diversity, equity, and inclusion in the field of computing, and to supporting the wellness and mental health of our students.Diversity and Inclusion
It is essential that all members of the course community – the instructor, TAs, and students – work together to create a supportive, inclusive environment that welcomes all students, regardless of their race, ethnicity, gender identity, sexuality, or socioeconomic status. All participants in this course deserve to and should expect to be treated with respect by other members of the community. Class meetings, lab sessions, office hours, and group working time should be spaces where everyone feels welcome and included. In order to foster a welcoming environment, students of this course are expected to: exercise consideration and respect in their speech and actions; attempt collaboration and consideration, including listening to opposing perspectives and authentically and respectfully raising concerns, before conflict; refrain from demeaning, discriminatory, or harassing behavior and speech.Wellness
Additionally, your mental health and wellness are of utmost importance to the course Instruction Staff, if not the College as a whole. All members of the instruction staff will be happy to chat or just to listen if you need someone to talk to, even if it’s not specifically about this course. If you or someone you know is in distress and urgently needs to speak with someone, please do not hesitate to contact BMC Counseling Services: 610-526-7360 (610-526-7778 nights and weekends). If you are uncomfortable reaching out to Counseling Services, any member of the Instruction Staff will be happy to contact them on your behalf. We understand that student life can be extremely difficult, both mentally and emotionally. If you are living with mental health issues such as anxiety, depression, ADHD, or other conditions that may affect you this semester, you are encouraged to discuss these with the Instructor. Although the details are up to you to disclose, the Instruction Staff will do their best to support and accommodate you in order to ensure that you can succeed this course while staying healthy.Created on January 2021. Subject to constant revision.