Sunday, 8 June 2014

Keeping Bees: Database

It is a good idea to keep records about your bees. The traditional method is hive-cards. I think that I can design and build a database for this purpose. I'll probably use mySQL, cgi-app, dbix-class with:

CREATE DATABSE bk;

USE bk;
CREATE TABLE `apiary` (
  `ap_id` int(255) NOT NULL AUTO_INCREMENT,
  `ap_name` int(255) default '1',
  `ap_location` varchar(255) default '1' COMMENT 'where is it',
  `ap_date_added` datetime default NULL,
  `ap_land_owner` varchar(255) default NULL,
  `ap_contract` varchar(255) default NULL,
  `ap_acid` int(255) unsigned,
  `ap_notes` blob default NULL,
  PRIMARY KEY  (`ap_id`),
  UNIQUE KEY `ap_id` (`ap_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE `hives` (
  `hi_id` int(255) NOT NULL AUTO_INCREMENT,
  `hi_apiary` int(255) default '1' COMMENT 'apiary.ap_id',
  `hi_type` varchar(255) default NULL COMMENT 'Nationa, WBC, TBH, hole-in-a-tree',
  `hi_marks` varchar(255) default NULL COMMENT 'what does it look like',
  `hi_keeper` int(255) unsigned  COMMENT 'who looks after it',
  `hi_owner` varchar(255) default NULL COMMENT 'who owns it',
  `hi_date_added` datetime default NULL,
  PRIMARY KEY  (`hi_id`),
  UNIQUE KEY `hi_id` (`hi_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;



CREATE TABLE `records` (
  `re_id` int(255) NOT NULL AUTO_INCREMENT,
  `re_hive` int(255) DEFAULT '1' COMMENT 'which colony within the apiary hives.hi_id',
  `re_date` datetime default NULL,
  `re_relocation` varchar(255) default NULL COMMENT 'New location',
  `re_move_reason` varchar(255) default NULL COMMENT 'why the new location',
  `re_palace` int(1) NOT NULL default '0' COMMENT 'Queen from?',
  `re_queen` int(1) NOT NULL default '0' COMMENT 'Queen seen?',
  `re_queen_marked` varchar(1) default NULL COMMENT 'W,Y,R,G,B',
  `re_queen_cells` int(16) default NULL COMMENT 'number of queen cells found',
  `re_brood_state` int(4) default NULL COMMENT 'how happy are they from 1..10',
  `re_brood_frames` int(4) default NULL COMMENT 'how many frames are the brood on',
  `re_eggs` int(1) default NULL COMMENT 'are there eggs in the brood?',
  `re_stores` int(1) default NULL COMMENT 'number of supers',
  `re_room` int(1) default NULL COMMENT 'number of brood frames',
  `re_health` varchar(16) default NULL COMMENT 'ok,CB=chalk brood,AFB,EFB,',
  `re_varroa` varchar(1) default NULL COMMENT 'n=none,l=low,m=medium,h=high,i=infestation',
  `re_varroa_count` int(32) unsigned default NULL COMMENT 'count of dead mites',
  `re_temperament` int(1) default NULL COMMENT '9=nice,8=agitated,6=stinging,4=follow,1=murder,0=burn',
  `re_feed` varchar(10) default NULL COMMENT '',
  `re_supers` int(10) default NULL COMMENT 'added or removed',
  `re_weather` varchar(16) default NULL COMMENT 'sunny,cloudy,rainy',
  `re_temperature` varchar(10) default NULL COMMENT 'degrees celcius',
  `re_notes` blob default NULL COMMENT 'Work that is requireda',
  PRIMARY KEY  (`re_id`),
  UNIQUE KEY `re_id` (`re_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;


I don't actually use this because I have Notice with its Asset management system and asset record cards. So the hives are abstracted into my Asset database and the hive-record cards are specific asset record cards. (Because the Notice::Asset system can nest assets within assets, the apiary is simply another asset that contains the hives.)

Wednesday, 28 May 2014

White-washing the little room

#KYFC, (Keep your flying cars!) why isn't there a hydro-powered white, (or pink) noise generator that attaches to the lavatory? As houses and flats are built with thinner and thinner walls and doors, white noising out the sound of splashing water and other falling objects is going to become poopular. With the reduction-over-time of the volume of water being flushed, an elaborate gear train connected to a tiny lever at the back of the seat could stop the seat from being slammed/dropped and generate the tiny amount of current needed to power a microphone,processor,speaker that will dissolve the sound of your toilet activities.

Alternatively a lever that is powered by the emptying and refilling of the cistern, (some float on the end of an arm) might be easier to sell.

There seems to already by versions that make masking noises, but that seems as bad as aerosol room-perfumes, when you can simply open a window.

Get too it Internet.

Thursday, 22 May 2014

tumblr.com

I was scrolling through tumblr and exploded with laughter at something that, on some level, I knew wasn't LOL funny and that I could not share it with any of my friends. Then it occurred to me that there is something else that I consume from the Internet that I don't share with my friends, and isn't special at all once the 'joke' is over.

Sometimes a mind is an odd experience.

Thursday, 20 March 2014

[DSJ] What do you call a diverse group generated by the base trial and error of natural selection to form animals?

Try Low Bites? [1]

[0] DSJ Domain Specific Joke
[1] word play on the homophone of Trilobites. [2]
[2] Try: natural selection; Low: base, original, simple; Bites: animals have mouths