Wednesday, November 11, 2009

It's definite, I will not be able to be in class on Thursday, 12 November

I have had a situation arise that will preclude me from being in Chapel Hill on Thursday, 12 November 2009 and so we won't be having a class session. We will pick up Thursday's session next Tuesday, 17 November and plan to move on to forms on that day as well. We will push queries back to Thursday and maybe the following Tuesday as well. I will modify your task to eliminate the requirement to create a report using your database, but you still may wish to try one out when we get there.

You can follow pretty much what I would have been saying to you in class by working your way through our class notes for Thursday. If you already have your five tables ready (books, authors, publishers, book-author, and orders), you are ready to relate them together. You may do it manually in the relationship window by grabbing the Primary Key field from the table that is the one side of a one-to-many relationship with the left key on your mouse and, keeping the left key pressed, drag the PK over the Foreign Key field in the table that is the many side of the one-to-many relationship. This will effect a relationship between the two fields in the two tables.

But you need to enforce referential integrity to make the relationship strong and healthy. You do this in the relationship window by right-clicking on the line that connects two tables. This should reveal the dialog box that offers you the opportunity to select "enforce referential integrity." (You can see this dialog box by looking at the slides linked to the class notes.) Enforcing referential integrity activates a system of rules that ensure relationships between records in related tables are valid, and that you don't accidentally delete or change related data. You may run into some issues with referential integrity and the dialog box may tell you that you cannot do it. The usual suspects are that you are
  1. attempting to enforce referential integrity on two fields with different data types (text related to number, for example)
  2. attempting to enforce referential integrity on two fields with similar data types, but different data formats or field sizes (a number with a field size/format of double attempting to be related to a number with a field size/format of long integer, for example)
One of the challenges you will encounter in working with relationships is that you cannot change a relationship between tables when the tables are open. So you will have to close the tables to do some relationship work. And, if you find you need to work on a table field that is already in a relationship, you will have to first delete the relationship in the relationship window (which you cannot do until you close the table first) by right-clicking on the relationship line and selecting "delete". You can then open the table, fix the field, save the table, close the table, go back to the relationship window, and re-create the relationship and the referential integrity.

But that was all prologue to this: it is easiest to create relationships by
  • going to the table design view for a table that is the many side of a one to many relationship
  • finding the foreign key in the table
  • selecting the data type field in design view
  • noticing the drop down lookup box when you select the data type
  • selecting the Lookup Wizard from the drop down lookup box choices
  • working through the Wizard to create a new drop down lookup box that will appear in this field in the datasheet (not the design) view that will allow you to see the names of the related fields in the table that is the one side of the one to many relationship
When you use the Wizard, the lookup box will look at the values you have asked it to show you (maybe you will look at book titles for the foreign key in the Orders table), and allow you to select the value you wish to copy to place in a record in the table that is the many side of the relationship. But the database will actually place a copy of the primary key from one record in the related table into the foreign key field in one record in the table that has the lookup box in it. This will effect the relationship between one record in one table and one record in another table.

If you use the Wizard, it will create the relationships for you, but you will still have to open your relationship window to enforce referential integrity on each relationship.

It's a lot easier to show and do than it is to explain, but Microsoft has some good explanations linked from our class pages. They go into detail we won't need for this class and steps we won't follow, but they do a good job.

I may well be available during class time via Google Chat. If you wish to chat, add my gmail address to your chat list and, if I'm online, I should be visible.

See you all next week.

Possible schedule change

Be aware that there exists the possibility that I may not be able to be in Chapel Hill on Thursday. If that is the case, I will post a new note to the blog to let you know. If we don't have class on Thursday, we will do relationships next Tuesday and compress a future session in some fashion.

The Great Firewall of China

Ever since the beginning of class when we discussed the history of the Internet, I've been interested in issues associated with information access and usability -- particularly as they relate to Google and the company's "Don't be Evil" policy. 

Here's a link to a very interesting article about Google's willing participation in the censorship of information in China:

http://www.nytimes.com/2006/04/23/magazine/23google.html?pagewanted=8&ei=5090&en=972002761056363f&ex=1303444800

I'm thinking about possibly doing my thesis paper on information access, firewalls, and the Chinese goverment -- so I may be shouting from the mountaintop on this one -- but maybe you'll find it interesting as well. 

On the one hand, you can't blame Google for being a successful, innovative company.  But on the other... well... you can.  And I think that, at some point, you have to. 

Tuesday, November 10, 2009

Web 2.0 BS Generator

Hey all,

I stumbled across this today and thought that, as LS/IS students, we can all particularly appreciate the humor:

http://www.emptybottle.org/bullshit/


I apologize if anyone is offended by the terminology, but it's all in good fun!

Change to subtask 5.1

I made a small change to the subtask 5.1 page. Look at the page last updated on 10 November 2009 for the correct wording on how to create an automatic primary key.

Starters for tables session

Why is 11 November celebrated as Veteran's Day?

It goes back to World War I. The Allied powers a signed a cease-fire agreement with Germany at Rethondes, France on November 11, 1918, bringing World War I to a close. Between the wars, November 11 was commemorated as Armistice Day in the United States, Great Britain, and France. After World War II, the holiday was recognized as a day of tribute to veterans of both world wars. Beginning in 1954, the United States designated November 11 as Veterans Day to honor veterans of all U.S. wars.

But why this date?

The Allies' armistice terms were first presented to German negotiators on 8 November 1918. Alarmed at the severity of the terms, the Germans lodged formal protests before reluctantly signing revised terms at 5 a.m. on 11 November; the armistice was to come into effect six hours later, at 11 a.m.

But the eleventh hour of the eleventh day of the eleventh month sounds significant. Was it?

Martinstag (11. November)

November 11 is a special day in the U.S., Canada, and German-speaking Europe, but when North Americans are observing Veterans Day/Remembrance Day, most Austrians and German Catholics are celebrating a different kind of holiday.

The Feast of Saint Martin, the Germanic Martinstag celebration, is more like Halloween and Thanksgiving rolled into one. Martinstag or Martini commemorates Sankt Martin (c. 317-397), Bishop of Tours, one of the most revered European saints. The best-known legend connected with Saint Martin is the dividing of the cloak (die Mantelteilung), when Martin, then a soldier in the Roman army, tore his cloak in two to share it with a freezing beggar at Amiens.

In the past, Martinstag was celebrated as the end of the harvest season (thanksgiving). For workers and the poor it was a time when they had a chance to enjoy some of the bounty and get a few crumbs from the nobles' table (“einige Krümel vom reichgedeckten Tisch”). Today in many parts of Europe the feast is still celebrated by processions of children with candle-lit lanterns (Martinslaternen) and a banquet of roast goose (die Martinsgans).

In former times, Martini was the “official” start of winter and the 40-day Christmas fast. Today Martinstag is the unofficial start of the Christmas shopping season in German Europe.

Tauftag Martin Luthers (11. November)

Although Martinstag is a Catholic observance, German Protestants also consider November 11th a special day. On this date the Protestant reformer (Reformator) Martin Luther (1483-1546) was christened, making it his Tauftag. It is celebrated in much the same way as Martinstag:
Jedes Jahr am 11. November feiern wir den Tauftag Martin Luthers mit Reformationsbrötchen und Lampionumzug.” (Every year on the 11th of November we celebrate the christening day of Martin Luther with Reformation rolls and lantern processions.)
In Dresden and most of Saxony (Sachsen) the traditional baked article is known as Reformationsbrot rather than -brötchen because it is a loaf weighing between 500 grams and a full Kilo.

Fasching

November 11 is also the kick-off of Fasching, Karneval and Fastnacht. For one day revelers are drawn into the streets, before the activities in carnival clubs, street and neighborhood groups, begin in earnest as the preparations for the January/February crazy days, are in full swing.

In the Alpine regions St. Martin's used to coincide with "Viehabtrieb," bringing the animals back into the villages from their summer's stay higher up and is still celebrated in some areas.

The Fasching season ends when Lent begins, thus Mardi Gras is the end of the Fasching season.

So the Armistice that ended the fighting on the Western Front in the First World War was set to begin on the 11th hour of the 11th day of the 11th month because that was a time and date known to German soldiers, Catholic and Protestant alike, as the start of a holiday season. It was a time they could recognize and a time that everyone could agree on.

There are reasons why things are the way they are.