31. Homework #5 Solutions Posted

Solutions to homework #5 have been posted on the materials page. If by any chance you find errors in the solutions, please send me an e-mail so I can fix them.

-- Demian Lessa

30. Grades

Your grades for homework #4 are now available. A preliminary view of your score distributions for homework #4 has been posted, as well as your updated cumulative score distributions, including 50 points (30 for tests, 20 for homeworks). Your homework #4 scores were very skewed to the higher end of the curve so I did not correct them. These distributions should give you a fair measure of how well you are doing in the course so far.

-- Demian Lessa

29. Homework #3 and #4 Solutions Posted

Solutions to homeworks #3 and #4 have been posted on the materials page. If by any chance you find errors in the solutions, please send me an e-mail so I can fix them.

-- Demian Lessa

28. Stored Procedures and Triggers

The optional homework #7 on stored procedures and triggers has been posted. Additionally, a script file with a detailed account of stored procedures and triggers for a sample database has been included in the materials page. The script is exactly the one we went over on Wednesday, with lots of inline comments.

Remember that this was all done in the context of PostgreSQL. If you wish to reproduce the experiment, all you need is to install the DBMS on your machine (very modest specs required). You could also install PgAdmin3 client, which is the one I used in class yesterday. This will make things easier on you.

-- Demian Lessa

27. Indexing

The optional homework #6 on indexing has been posted. Additionally, a script file with a detailed account of index creation for a sample database has been included in the materials page. The script contains much of what we did yesterday and more, with lots of inline comments.

Remember that this was all done in the context of PostgreSQL. If you wish to reproduce the experiment, all you need is to install the DBMS on your machine (very modest specs required). You could also install PgAdmin3 client, which is the one I used in class yesterday. This will make things easier on you.

-- Demian Lessa

26. Student Feedback Request

I encourage all students to provide feedback about their Database Concepts course experience. Your feedback must address only teaching and course related aspects. In particular, I would like to hear about:

  1. Teaching and course related aspects in general:
    • Do you think you achieved your expected goals with this course?
    • Do you think you would be able to use the material you learned in this course?
    • Would you recommend this course to other students?
    • Would you recommend other courses taught by the instructor?
    • Is there anything that you wish were done differently in this course?
  2. Teaching and course related aspects in detail:
    • Organization of the course.
    • Form of lectures and recitations.
    • Breadth and depth of material covered.
    • Quality of provided materials (handouts, slides, web site, etc).
    • Quality of lectures and recitations (preparation, knowledge, etc).
    • Grading fairness (be mature about this!).
    • Difficulty of homeworks/tests-- did it match the level of the lectures?
    • Availability and helfulness of the instructor and the TA.
  3. Comments, criticisms (make it constructive), suggestions for improvement.

I would like to add a section to the web site, "What Students Are Saying," so I would also like to request for your permission to publish your feedback on the course web site. A published feedback may include your name or may be anonymized, you decide. Note that, just as with the feedback itself, permission to publish is strictly optional (but very welcome).

-- Demian Lessa

25. Final Exam

The final exam will be open book but not open notes, so please arrange to have a copy of the textbook for the final-- you will not be able to share books during the final exam! The material that you should cover for the final exam is listed below, with a tentative weight distribution for each topic. The major absence in this list is Relational Algebra. You may expect at least one extra-credit problem in the exam.

  1. Relational Model (10%)
  2. Relational Design (25%)
    • Functional Dependencies
    • Multivalued Dependencies
    • Normal Forms: BCNF, 3NF, 4NF
    • Lossless-Join Decompositions
    • Dependency-Preserving Decompositions
    • The Chase (all variations covered by the textbook)
  3. Entity/Relationship (15%)
    • Entity Sets and Attributes
    • Relationships: Attributes, Cardinality, and Optionality
    • Is-A Relationships
    • Weak Entity Sets: Discriminators, Identifying Relationships
    • Mapping to a Relational Schema
  4. SQL (25%)
    • Simple Queries: SELECT-FROM-WHERE
    • Set/Bag Operations: UNION [ALL], INTERSECT [ALL], EXCEPT [ALL]
    • Joins: cartesian; inner and outer (theta and natural)
    • Subqueries: IN, EXISTS, ALL, ANY
    • Grouping and Aggregation
    • Handling NULLs
    • Case Expressions
    • Updates: INSERT, DELETE, UPDATE
  5. XML (25%)
    • Semi-Strutured Data Model
    • Well-Formed XML Documents
    • DTD for XML Validation
    • XSchema for XML Validation
    • XPath
    • XQuery

Study Tip

Get familiar (even more so than you already are) with the orders data model we have discussed throughout the semester. The final exam may have SQL queries involving this data model (or a variant). For XML, come up with different DTDs/XSchemas for this data model, considering different ways in which the elements may be nested. Then, take two of the schemas you come up with (say, "in-schema" and "out-schema") and write an XQuery that takes documents of type "in-schema" and produces documents of type "out-schema".

-- Demian Lessa

24. Grades

Your grades for homework #3 and test #2 are now available. A preliminary view of your score distributions for test #2 has been posted, as well as your updated cumulative score distributions including both tests and the first three homeworks. Your test #2 scores are provided on top of your papers, circled in red; below that score you will find your current cumulative raw score, circled in black. Your test #2 scores were close enough to the normal curve that I did not need to correct them-- as a matter of fact, any correction would have skewed rather than corrected the distribution. These distributions should give you a fair measure of how well you are doing in the course so far.

-- Demian Lessa

23. XPath/XQuery Gateway

A very basic gateway to the Saxon Home Edition command line utility is provided through this site, from which you can write XPath and XQuery queries and execute against two fixed documents, bib.xml and phd.xml.

-- Demian Lessa

22. Homework #4 Posted

Homework #4 is available for download from the course materials page and is due on April 11, 2011.

-- Demian Lessa

21. Materials and Test #2

The ER Design lecture slides and the exercises solved in class on 03/25--03/28 have been posted on the materials page.

We will review on Wednesday and on Friday we will start XML. Test #2 will be on Monday, 04/11.

-- Demian Lessa

20. Project #1 and the Driver class

In project #1, the Driver class makes a strong assumption about how to read a line from the standard input. Some of you using Windows have been having problems running this class from your laptops or PCs. The reason is that in Windows, the enter key produces two characters-- a carriage return (\r) followed by a line feed (\n). If you look at the getLine() method, you will notice that the code scans only for the line feed character. You can thus conclude that, under Windows, the return of the method includes the text you typed followed by a carriage return character-- that's why you may have experienced an error message indicating a failed authentication with an invalid username/password. To fix this, modify getLine() as indicated below (don't forget to add the new classes to the import list!). package edu.buffalo.cse.cse462;

import java.io.BufferedReader;
import java.io.InputStreamReader;
...

public final class Driver {

  ...

  public static String getLine() throws java.io.IOException {

    InputStreamReader isr = new InputStreamReader(System.in);
    return new BufferedReader(isr).readLine();
  }
  ...
}

-- Demian Lessa

19. Back from Spring Break

Welcome back from Spring Break! I just updated the materials page with the relational design slides. No assignments were posted during the break but your next homework assignment will be posted on the 25th and will cover relational design and ER design. Also remember that this week both your project #1 and homework #3 (optional) are due.

-- Demian Lessa

18. Homework #3 Posted

The optional Homework #3 is available for download from the course materials page and is based on the canceled version of test #1. You have been returned the canceled version of test #1 yesterday so that you can take advantage of the work you put on the problems during those 50 minutes.

If you did not get your homeworks or tests yet, the TA will have them in the next two recitations. If you do not pick your papers until next Friday, you will have to arrange directly with the TA some convenient time for you to pick them up.

-- Demian Lessa

17. Grades

Your grades for homework #1, homework #2, and test #1 are now available. A preliminary view of your score distributions has been posted for each of them. For the homeworks, a raw score distribution is provided-- simply divide your grade by the maximum number of points, multiply by 10 and round up. For the test, your corrected scores have been provided on top of your papers, circled in green. These distributions should give you a fair measure of how well you are doing in the course so far.

-- Demian Lessa

16. Project #1 Updated

The reference project and the complementary slides fo Project #1 have been updated. If you have an older version, please download the new ones. Changelog:

  • 02-28, Source: modified remaining references to Currency in OracleOrderDAO to Double.
  • 02-26, Source: modified OrderEntryImpl.KeyImpl making it public and static.
  • 02-24, Slides: added further details on referential action and deferred actions.
  • 02-24, Schema: changed relation name Order to Orders to solve a keyword conflict.
  • 02-24, Schema: modified the foreign key specification for the Orders and OrderKey tables.
  • 02-24, Source: specified how OracleDAOXXX classes must implement updates/deletes.
  • 02-24, Source: added default comments to OracleDAOXXX classes.
  • 02-24, Source: modified unitPrice from Currency to Double in Product and ProductImpl.

-- Demian Lessa

15. Homework #2 Solutions Posted

Solutions to homework #2 have been posted on the materials page. If by any chance you find errors in the solutions, please send me an e-mail so I can fix them.

Update #3 (02/28): I highlighted (in red) parts of three queries in problem 1 to show you what they should have been. Since those were my mistakes, you get all the points for problem 1.

Update #2 (02/24): a few minor fixes were made to the solutions this evening. Make sure you have the most recent copy.

Update #1 (02/24): There were two minor errors (ambiguous column name) in the queries of 1a and 1b, so everyone gets the points for those two questions.

-- Demian Lessa

14. Administrative Announcements

Announcement #1: The first test will not be graded and a new test will be scheduled this coming Friday (02/25) for some time next week. Note: if you wish to have your test #1 graded, simply drop me an e-mail requesting the grading.

Announcement #2: An optional homework will be posted within the next 5-7 days and will cover relational algebra and SQL. Note: if you choose to do the optional homework, you will end up with five homework grades instead of four. In this case, only your four best homework grades will be used towards your final grade computation.

-- Demian Lessa

13. Project #1 Posted

Project #1 has been posted. The handout, a set of complementary slides, and the reference project sources can be downloaded from the links in here as well as from the materials page. Please read the handout and the complementary slides carefully before this Friday and bring any questions you may have to class.

If you use Eclipse, importing the sources is very simple. Create a new Java project. Select the project (make sure you do not have the src folder selected), and choose File|Import... from the main menu. Under the General group, select "Archive File", and click Next. Browse until you find the project1-src.zip file, and click Finish.

Your project will not compile yet, because it requires the Oracle JDBC driver. So you need to configure the build path. Choose Project|Properties from the main menu, select the "Java Build Path" item and, on the Libraries tab choose "Add External JARs" and browse to "/util/oracle-10.2.0.1.0/jdbc/lib" in order to select ojdbc14.jar. Then click on OK and compile your project (if it's not configured to build automatically).

-- Demian Lessa

12. First Test is Wednesday

As discussed in class last Friday, our first test is now Wednesday, 02/23, and not this Monday. So you get two extra days to study.

-- Demian Lessa

11. Handout and Solutions Posted

The handout with the exercises solved in class on 02/16 have been posted on the materials page, with the respective solutions. If by any chance you find errors in the solutions, please send me an e-mail so I can fix them.

-- Demian Lessa

10. Oracle Tips

For tips on using the SQL*Plus command line client, visit the CSE IT Catalog page on Oracle Syntax Examples.

-- Demian Lessa

9. Homework #2 Posted

Homework #2 is available for download from the course materials page. Solutions to homework #1 will be posted soon.

-- Demian Lessa

8. Materials Posted

The SQL lecture slides and handouts have been posted on the materials page. The slides used in recitation #1 have also been uploaded, thanks to Niccolò.

-- Demian Lessa

7. Handouts and Solutions Posted

Handouts with the exercises solved in class on 01/31 and 02/04 have been posted on the materials page, with their respective solutions. If by any chance you find errors in the solutions, please send me an e-mail so I can fix them.

-- Demian Lessa

6. TA Office Hours

The TA office hours have been posted: Tuesdays and Thursdays from 2:00pm to 3:00pm. For your convenience, they are readily visible on the top of the web site's side bar.

-- Demian Lessa

5. Homework #1 Posted

Homework #1 is available for download from the course materials page. The exercises done in class today (01-31-2011) can also be found there. Solutions to the exercises will be posted soon.

-- Demian Lessa

4. Slides Updated

Final versions of the slides and handouts for relational algebra and relational model are posted on the course's materials and schedule pages.

-- Demian Lessa

3. Oracle Accounts

Oracle accounts have been created for all students currently registered for CSE462.

-- Demian Lessa

2. Course Syllabus

The course syllabus is now available for reading online. Please, make sure you read and fully understand it. We will go over the syllabus during our first class meeting.

-- Demian Lessa

1. Course Web Site Is Up!

Welcome to the CSE462 - Database Concepts course for Spring 2011!

Here, you will find the most important and current information about the course, including: course syllabus, class schedule, course materials (for download), contact information, course announcements, deadline reminders, tips, tutorials, and many helpful links. Visit the site often, as the site will be regularly updated.

The official course web site is: http://www-student.cse.buffalo.edu/~dlessa/cse462.

-- Demian Lessa

Valid W3C XHTML 1.0 StrictValid W3C CSS 2.1