School Archives, page 4

These posts are related to my time at the University of North Carolina at Chapel (UNC), specifically the School of Library and Information and Science (SILS), where I graduated with a Master’s of Science in Information Science in 2004. I also received my Bachelor’s degree in linguistics at UNC in 2002.

Query Rosetta Stone

Natural Language

One person can be in one or many photos and one photo can contain zero, one, or many people. List all the people who are in photos along with the filename and the description of the photo(s) they are in. People and photos may be listed multiple times, but a person will never be in the same photo twice (assuming the photos haven’t been doctored).

Microsoft Access Query by Example (QBE)

Microsoft Access QBE

SQL generated by Microsoft Access

SELECT [tblPeople].[LastName], [tblPeople].[FirstName], [tblPhotos].[Filename], [tblPhotos].[Description] FROM (tblPeople INNER JOIN tblPeopleInPhoto ON [tblPeople].[PeopleID] = [tblPeopleInPhoto].[PeopleID]) INNER JOIN tblPhotos ON [tblPeopleInPhoto].[PhotoID] = [tblPhotos].[PhotoID] WHERE ((([tblPeople].[LastName]) Is Not Null) And (([tblPeople].[FirstName]) Is Not Null));

SQL cleaned up for readability

SELECT tblPeople.LastName,
tblPeople.FirstName,
tblPhotos.Filename,
tblPhotos.Description
FROM (tblPeople INNER JOIN tblPeopleInPhoto ON tblPeople.PeopleID = tblPeopleInPhoto.PeopleID)
INNER JOIN tblPhotos ON tblPeopleInPhoto.PhotoID = tblPhotos.PhotoID
WHERE (tblPeople.LastName Is Not Null) AND (tblPeople.FirstName Is Not Null);

Relational Algebra

join tblPeople and tblPeopleInPhoto

R1 ← tblPeople equijoinPeopleID=PeopleID tblPeopleInPhoto

join the result of the first join, R1, with tblPhotos

R2 ← R1 equijoinPhotoID=PhotoID tblPhotos

select only those R2 records where LastName is not null

R3 ← σ LastName != Null (R2)

select only those R2 records where FirstName is not null

R4 ← σ FirstName != Null (R2)

intersect (AND) R3 and R4

R5 ← R3 ∩ R4

project 4 fields (columns) in the final Result

Result ← π LastName, FirstName, Filename, Description (R5)

Note: If the characters above don’t look like arrows, sigmas or pis, try the PDF version.

and a feeling of calm washes over me

i got past march 29th. and it feels like there is this life of possible leisure opening up on the other side. the compression of time and space that i was experiencing for the last several weeks has suddenly decompressed. the weather is getting nicer. graduation #2 approaches.

and i’m spent

i ended up spending all day today on the darn thing (33 hours straight? except for my 8am class and that 10am staff meeting and lunch with jane at pepper’s). there are some good parts and there are some rough edges. i still have some work to do, and of course i still have work to do. if i’m not in class tomorrow it’s probably because i’m in a coma like sleep. possibly still alive.

holy crap, i’m totally distracted

by the fact that my wireless access point (Linksys BEFW11S4v2) keeps dropping it’s signal, requiring me to *frequently* get up and unplug it and replug it. i’ve called tech support, i’ve reflashed the firmware (same version), i’ve changed the channel from 6 to 11 to 9. and it keeps happening. started about two weeks ago. i’m wondering if the folks next door have a new portable phone or something. it’s not like i /need/ it for what i’m doing right now (my freaking master’s paper!!!), but it sure is distracting for half a webpage to load and then suddenly, 0% signal, meanwhile the little devil is sitting 10 feet away from me blinking cheerfully.

and it only happens in the middle of downloading a webpage never during the hours between when i’m pulling my hair out trying to explain my project’s “background.” i’m going to weaver street. maybe i’ll be less distracted there.

by monday, march 29

i’ve been buckling down to build the financial system for work–as a proxy for my masters project. eventually i’ll stop programming, i’m thinking by cob thursday, and spend next weekend producing some draft writeup of what i did so that i can get it to marchionini by monday, march 29.

i’m really trying to get it to a functional system so that phill (my boss) can produce some reports detailing the first and second quarters of the new project (Measure, Phase II). as i see it, this whole master’s project writeup is merely incidental.

after that, may 9, graduation.