Fascinating idea. Does anyone have any suggestions for sites or books that discuss how to integrate a sensor and a SQL database? Sounds like that would be fun to try.
Usually there's no direct integration. Sensors capture data and forward it to application in text or binary format. Application can poll sensor or install an event handler (=interrupt handler or equivalent to sql trigger) that's triggered on incoming event (new data).
Application can do anything with the data, filter, analyze and insert results and/or raw data into database.
For example, video surveillance starts recording only when something changes in input stream, handling application takes care of noise tolerance (daylight change, flies, mosquito,... ).
First step is to decide what kind of data you want to capture and what kind of sensors you want to play with.