CSCI 3410 – On-line shift!

Spring 2020

Clément Aubert

April 29, 2020


2020/03/25 – Future Planning

Please, let me share with you how I’m planning on teaching for the next ~4 weeks of classes. In case you’ve been missing my handwriting, please find this plan on a white board (click to zoom):

Essentially:

Note that:

To Do

Today’s assignment is easy:

Stay safe!


2020/03/30 – Lecture #1

Hi,

Ok, first, I’m sure you’re longing to hear my voice, so here it is:

Last Time

Well, that was a while ago… We finished “How to design a database” by discussing normal forms, and decided that we would skip over UML diagrams. That means that today, we start a new chapter, on Database Applications.

Announcement

We need to re-organize the evaluation. My main goals are to:

I hope that I’ve managed to to fill those goals by offering the following. So far, you have taken:

I’d like to

Yes, that means that your grade will be computed out of 130%, so that the “take home” final exam is a bonus to boost your grade. Practically, the project will ask you to

  1. Write a business statement,
  2. Write the E.-R. model for the situation you are describing,
  3. Write the sql code for that E.-R. model,
  4. Write a small application in Java to interact with your database.

The idea being that, for the ~4 weeks we have left, you would complete 1 step every week, and report back to me so that I could advise and help you in this project. Yes, that is a lot of discussion and work, but we can do it asynchronously, and with technologies that are familiar to you.

We will discuss the modalities of the take home exam later, but I was thinking of giving you a couple of problems around 04/29, and collect them by 05/06. You could do them any way you see fit: on paper, via email, …

To Do, Today!

Here is what we’ll do today:

Last, please:


2020/04/01 – Lecture #2

Ok, you’ve seen the white board, heard my voice, but I’m sure you’re missing my face, now, so there it is.

Last Time

Hopefully you’ve all managed to install Java, became more familiar with the command-line interface of your operating system, and managed to run your first Java program (not database-related). As a by-product, you’ve learned that there was nothing to be affraid of about Java, and that you could read a simple program directly.

You’ve also learned that there was multiple ways of interacting with a DBMS, and that we would focus on database applications written in Java, and using the “J” connector for mysql.

Announcement

Since you seem to agree with our new evaluation method, let me share some more details about the project with you.

Project

Your goal is to

  1. Write a business statement for a situation you believe of interest and that requires data to be managed,
  2. Draw the E.-R. model for that situation,
  3. Implement your model in SQL,
  4. Write a small application that perform basic tasks with your implementation.

And we will exchange about every step of your project as we go.

To share your project with me, please create a folder on Box and invite me as a collaborator. You should have 4 sub-folders in that folder:

  • one for your business statement, shared as a text file (due 04/13)
  • one for your E.-R. diagram, shared as a picture (due 04/13)
  • one for your SQL code, shared as a text file (due 04/20)
  • one for your java application (due 04/27)

Instructions will follow about the implementation aspect, but you should get started with your design now: share with me as early as you can your initial thoughts and draft of model, so that you’ll be able to move forward when it is time to do so. Going back to your design later in the project is allowed, so that I’ll evaluate your project as a whole, once it is completed, but you have to share with me your initial thought before 04/13.

To Do, Today!

Here is what we’ll do today:

There is a lot of practise on that particular lecture, so make sure you follow the instructions closely, and you should get two nice Java applications working on your computer at the end of this class! As always, you can find the source code directly on-line, at

I’ve updated the notes to add more comments and explanation, but feel free to ask on team or via email if there’s something not clear. The programs themselves are fairly short, but they involve a new API and multiple new classes and methods, so make sure you walk through it slowly and carefully!

Thanks a lot, have a great week-end!


2020/04/13 – Lecture #3

I hope you all had a great break and that you are now adjusted to the new delivery of your classes.

Last Time

Ok, this was a “long” time ago, but hopefully you remember that we are now exploring the world of databases interactions. We looked at the big picture, made a flash intro to Java, and made our first “proof-of-concept” application. Today’s main focus will be on two programs, that you can find in this archive, and that will be presented in detail during class.

We also looked at how to “map” datatypes between java and mysql, and at various method to execute statement in the DBMS from the Java program. Please, have a look back if you forgot about those.

Announcement

Please, remember that the business statement and the E.-R. model are due today! It is essential that I have a look at it before you move forward to the SQL implementation, especially since the project is open-ended: I’ve already discussed some interesting proposals with some of you, but I need to discuss them with all of you! So even if it is still drafty, send me something today (or, I should say, share it with me on box). I’ll try to get back to all of you before tomorrow ends, if I have not already. Feel free to ask questions in the chat if something is not clear.

For those who feels ready, start working on the SQL implementation: convert your E.-R. model to the relational model, and then start coding! Your schema name should be HW_<YourLastName>, and being executable with the usual testuser / password credentials. Make sure you save your commands as you go, as you’ll have to share a sql file with me containing all the instructions needed to re-create the same environment. Do not spend time on filling your database with data: the overall organization is what matters for now.

To Do, Today!

Here is what we’ll do today:

There is, again, a lot of practise on that particular lecture, so make sure you follow the instructions closely, that you read all the code and the comments, and you should start to get a good idea on how to write “advanced” Java applications!

I’ve substantifically updated the notes to add more comments and explanation, but feel free to ask on team or via email if there’s something not clear. This is one of my favorite class, as we start to see the interplay of java and mysql in its full details, but it is also one of the hardest!

Thanks a lot, have a great day, and stay safe!


2020/04/15 – Lecture #4

Hello! I hope my feedback on your project was useful, and that you feel ready to start working on its implementation! Today, we will have a (short) lecture on DBMS security. Some of it may overlapse what you already know, but specificities of DBMS will be discussed as well.

Last Time

We did some incredible Java programs. Hopefully you feel comfident with them, and will be able to read, understand, compile and execute today’s programs (shared in this archive) easily!

To Do, Today!

Here is what we’ll do today:

The notes have been, as always, updated to add more comments and explanations, but feel free to ask on team or via email if there’s something not clear. Security is an important topic, and it is important that you take it seriously. Thinking “What’s the point, there will always be someone smarter than me that can gain un-authorized access to my system” is like not washing your hands before eating because you may get sick in any case: that might be true, but that does not mean you should not actively try to lessen the chances of the bad thing happening!

Thanks a lot, have a great day, a great week-end, and stay safe!


2020/04/20 – Lecture #5

Hello! I hope you all had a great week-end. We have 4 classes left, and they will be devoted to NoSQL and to finishing your project. Remember that at least a sketch of your implementation in SQL is due today.

Last Time

We discussed database security. You should have performed your first SQL injection on your own, and realized how easy it was to send commands to the DBMS through a poorly secured database application. Note that, generally speaking, not giving access to your database directly is the way to go: a good application should gather the information or request from the user, send it to an application on the server-side, which is the only one that can access the DBMS. Acceding directly the database from the application is a simplification we performed in this class that is still useful if you know who will run your database application and how (think of an internal tool). But if you are planning on developing an application that will be broadly distributed to the “outside world”, it should not make a direct access to your database.

To Do, Today!

Here is what we’ll do today:

The notes have been, again, updated to add more comments and explanations, but feel free to ask on team or via email if there’s something not clear. It is important to have a good feeling of what NoSQL systems can and can not do, and of how popular they are. Next time, we’ll have a look at one of the most used NoSQL system, mongoDB.


2020/04/21 – Some Notes on Project #2

I thought this was probably a good time to give some clarifications on the second project, and to centralize the information. Please, get in touch if you have any question about it. Remember that this second project is 50% of your grade!

The requirements are fairly open-ended to encourage your creativity, and I have been pleased with the ideas I have seen so far. This on-line shift is disruptive in many way, and I know this evaluation is not the “pedagogical contract” we had at the beginning of the semester. However, I believe it gives you more freedom to work on the aspect you like the most, and relieves you from the stress of taking “live exam”. Show me the best of your abilities, your engagement, and deliver something that compile and run smoothly on any installation by 04/27.

Also, note that you are more than encouraged to update all the aspects of the project as you go! Going back to your ER diagram to improve it and reflect your implementation more closely is encouraged!


2020/04/22 – Lecture #6

Hello! I hope you and your loved ones are all safe and sound, and that you are not considering starting to smoke because some news believe that smokers are less at risk of getting sick with the Covid-19. Today, we will have a quick look at one of the most important actor in the NoSQL “eco-system”, MongoDB.

Last Time

You’ve read about the story and development of the NoSQL approach. The main “take-home” message from that section was, in my opinion, that it’s not a binary conflict between NoSQL and SQL, and that you don’t have to “chose a camp”. Those are two different categories of tools, suited for different needs, and you can move from one to the other between projects, or even within a project. It is perfectly acceptable to start with “less structured data”, and, as your project grows, to “stiffen” the data, and to develop a more rigorous schema.

Oh, and, passing by, most of the course content applies to NoSQL as well. We will see for instance that security risks are very much the same, and that design plays an important role too: it’s not because you are not forced to be structured that your program should become completely structure-less!

To Do, Today!

Here is what we’ll do today:

The notes have been, again, updated to add more comments and explanations, but feel free to ask on team or via email if there’s something not clear. Please, do not start reading “MongoDB Database Program” yet, as this section needs a serious update.


2020/04/27 – Lecture #7

Hi!

Announcement

Last Time

We discussed mongoDB, which is a popular “No SQL” approach using documents. We discussed some intuitions on documents and the similarities between mongoDB and the “RDBMS”, and set-up your installation. We concluded with some CLI commands to perform simple tasks like creating a database, inserting, deleting and querrying it.

To Do, Today!

Here is what we’ll do today:


2020/04/29 – Farewell!

If you have not received an email from me stating otherwise, then you are probably done with your project. The final exam is available on D2L, it is due on May 6, 2020 11:59 PM.


Miscellaneous