USE fetchmetrics; -- Error Message Types /* Existing table */ INSERT INTO fetchmetrics.CORE_Msg_Error_Type ( code , name , description , is_breaking_error ) VALUES ( 'BAD_DATA' , 'Invalid data' , 'Rubbish data' , 1 ) , ( 'NO_PERMISSION' , 'No permission' , 'Not authorised' , 1 ) , ( 'MYSQL_ERROR' , 'MySQL error' , 'MySQL execution error.' , 1 ) , ( 'WARNING' , 'Warning' , 'Non-breaking error.' , 0 ) ; INSERT INTO fetchmetrics.CORE_File_Type ( code , name , is_image ) VALUES ( 'JPG' , 'JPG' , 1 ) ; -- Access Levels INSERT INTO fetchmetrics.DOG_Access_Level ( display_order , code , name , priority ) VALUES ( 1 , 'VIEW' , 'View' , 3 ) , ( 2 , 'EDIT' , 'Edit' , 2 ) , ( 3 , 'ADMIN' , 'Admin' , 1 ) , ( 4 , 'NONE' , 'None' , 999 ) ; -- Permission Groups INSERT INTO fetchmetrics.DOG_Permission_Group ( display_order , code , name ) VALUES ( 1 , 'DOG' , 'Dog' ) , ( 2 , 'COMPANY' , 'Company' ) , ( 3 , 'COMMAND' , 'Command' ) , ( 4 , 'ASSESSMENT' , 'Assessment' ) , ( 100 , 'USER' , 'User' ) , ( 200 , 'PROJECT_HUB' , 'Project Hub' ) ; -- Permissions INSERT INTO fetchmetrics.DOG_Permission ( display_order , code , name , id_permission_group , id_access_level_required ) VALUES ( 1 , 'DOG_VIEW' , 'View Dog' , 1 , 1 ) , ( 2 , 'DOG_EDIT' , 'Edit Dog' , 1 , 2 ) , ( 3 , 'DOG_ADMIN' , 'Admin Dog' , 1 , 3 ) , ( 1 , 'COMPANY_VIEW' , 'View Company' , 2 , 1 ) , ( 2 , 'COMPANY_EDIT' , 'Edit Company' , 2 , 2 ) , ( 3 , 'COMPANY_ADMIN' , 'Admin Company' , 2 , 3 ) , ( 1 , 'COMMAND_VIEW' , 'View Command' , 3 , 1 ) , ( 2 , 'COMMAND_EDIT' , 'Edit Command' , 3 , 2 ) , ( 3 , 'COMMAND_ADMIN' , 'Admin Command' , 3 , 3 ) , ( 1 , 'ASSESSMENT_VIEW' , 'View Assessment' , 4 , 1 ) , ( 2 , 'ASSESSMENT_EDIT' , 'Edit Assessment' , 4 , 2 ) , ( 3 , 'ASSESSMENT_ADMIN' , 'Admin Assessment' , 4 , 3 ) , ( 1 , 'USER_VIEW' , 'View User' , 5 , 1 ) , ( 2 , 'USER_ADMIN' , 'Admin User' , 5 , 3 ) , ( 3 , 'USER_CREATE' , 'Create User' , 5 , 2 ) , ( 1 , 'CONTACT_FORM_ADMIN' , 'Admin Contact Form' , 6 , 3 ) , ( 2 , 'CONTACT_FORM_CREATE' , 'Create Contact Form' , 6 , 4 ) ; -- Users INSERT INTO fetchmetrics.DOG_User ( id_user_auth0 , firstname , surname , email , is_super_user , active ) VALUES ( 'auth0|6582b95c895d09a70ba10fef' -- id_user_auth0 , 'Teddy' -- firstname , 'Middleton-Smith' -- surname , 'edward.middletonsmith@gmail.com' -- email , 1 -- is_super_user , 1 -- active ) , ( 'auth0|672659014296b7f94a9bab45' -- id_user_auth0 , 'Tierney' -- firstname , 'Gullen' -- surname , 'tierneybailey13@gmail.com' -- email , 1 -- is_super_user , 1 -- active ) , ( NULL -- id_user_auth0 , 'Command Bot' -- firstname , 'Bot' -- surname , 'teddy@partsltd.co.uk' -- email , 0 -- is_super_user , 1 -- active ) , ( 'auth0|679cc2fe0d652a47af90d16b' -- id_user_auth0 , 'Demo' -- firstname , 'Demo' -- surname , 'bot@partsltd.co.uk' -- email , 0 -- is_super_user , 1 -- active ) ; -- Roles INSERT INTO fetchmetrics.DOG_Role ( display_order , code , name , id_user_created_by ) VALUES ( 1 , 'SUPER_USER' , 'Super User' , 1 ) , ( 4 , 'CLIENT' , 'Client' , 1 ) , ( 2 , 'COMPANY_MANAGER' , 'Company Manager' , 1 ) , ( 3 , 'TRAINER' , 'Trainer' , 1 ) ; -- Role Permission link INSERT INTO fetchmetrics.DOG_Role_Permission_Link ( id_role , id_permission , id_access_level , id_user_created_by ) VALUES ( 1 , 1 , 3 , 1 ) , ( 1 , 2 , 3 , 1 ) , ( 1 , 3 , 3 , 1 ) , ( 1 , 4 , 3 , 1 ) , ( 1 , 5 , 3 , 1 ) , ( 1 , 6 , 3 , 1 ) , ( 1 , 7 , 3 , 1 ) , ( 1 , 8 , 3 , 1 ) , ( 1 , 9 , 3 , 1 ) , ( 1 , 10 , 3 , 1 ) , ( 1 , 11 , 3 , 1 ) , ( 1 , 12 , 3 , 1 ) , ( 1 , 13 , 3 , 1 ) , ( 1 , 14 , 3 , 1 ) , ( 1 , 15 , 3 , 1 ) , ( 1 , 16 , 3 , 1 ) , ( 1 , 17 , 3 , 1 ) , ( 2 , 1 , 1 , 1 ) , ( 2 , 2 , 1 , 1 ) , ( 2 , 3 , 1 , 1 ) , ( 2 , 4 , 1 , 1 ) , ( 2 , 5 , 1 , 1 ) , ( 2 , 6 , 1 , 1 ) , ( 2 , 7 , 1 , 1 ) , ( 2 , 8 , 1 , 1 ) , ( 2 , 9 , 1 , 1 ) , ( 2 , 10 , 1 , 1 ) , ( 2 , 11 , 1 , 1 ) , ( 2 , 12 , 1 , 1 ) , ( 2 , 13 , 1 , 1 ) , ( 2 , 14 , 1 , 1 ) , ( 2 , 15 , 1 , 1 ) , ( 2 , 16 , 1 , 1 ) , ( 2 , 17 , 1 , 1 ) , ( 3 , 1 , 2 , 1 ) , ( 3 , 2 , 2 , 1 ) , ( 3 , 3 , 1 , 1 ) , ( 3 , 4 , 2 , 1 ) , ( 3 , 5 , 2 , 1 ) , ( 3 , 6 , 1 , 1 ) , ( 3 , 7 , 2 , 1 ) , ( 3 , 8 , 2 , 1 ) , ( 3 , 9 , 1 , 1 ) , ( 3 , 10 , 2 , 1 ) , ( 3 , 11 , 2 , 1 ) , ( 3 , 12 , 1 , 1 ) , ( 3 , 13 , 1 , 1 ) , ( 3 , 14 , 1 , 1 ) , ( 3 , 15 , 1 , 1 ) , ( 3 , 16 , 1 , 1 ) , ( 3 , 17 , 1 , 1 ) , ( 4 , 1 , 1 , 1 ) , ( 4 , 2 , 2 , 1 ) , ( 4 , 3 , 1 , 1 ) , ( 4 , 4 , 1 , 1 ) , ( 4 , 5 , 1 , 1 ) , ( 4 , 6 , 1 , 1 ) , ( 4 , 7 , 1 , 1 ) , ( 4 , 8 , 2 , 1 ) , ( 4 , 9 , 1 , 1 ) , ( 4 , 10 , 1 , 1 ) , ( 4 , 11 , 1 , 1 ) , ( 4 , 12 , 1 , 1 ) , ( 4 , 13 , 1 , 1 ) , ( 4 , 14 , 1 , 1 ) , ( 4 , 15 , 1 , 1 ) , ( 4 , 16 , 1 , 1 ) , ( 4 , 17 , 1 , 1 ) ; -- User Role link INSERT INTO fetchmetrics.DOG_User_Role_Link ( id_user , id_role , id_user_created_by ) VALUES ( 1 , 1 , 1 ) , ( 2 , 3 , 1 ) , ( 3 , 2 , 1 ) , ( 4 , 2 , 1 ) ; # Unit of Measurement INSERT INTO fetchmetrics.DOG_Unit_Measurement ( name_singular, name_plural, symbol, is_base_unit, is_unit_of_distance, is_unit_of_mass, is_unit_of_time, is_unit_of_volume ) VALUES ('metre', 'metres', 'm', 1, 1, 0, 0, 0) , ('millimetre', 'millimetres', 'mm', 0, 1, 0, 0, 0) , ('kilogram', 'kilograms', 'kg', 1, 0, 1, 0, 0) , ('gram', 'grams', 'g', 0, 0, 1, 0, 0) , ('litre', 'litres', 'L', 0, 0, 0, 0, 1) , ('millilitre', 'millilitres', 'mL', 0, 0, 0, 0, 1) , ('item', 'items', 'x', 0, 0, 0, 0, 0) , ('second', 'seconds', 's', 1, 0, 0, 1, 0) , ('hour', 'hours', 'h', 0, 0, 0, 1, 0) , ('day', 'days', 'd', 0, 0, 0, 1, 0) , ('ratio', 'ratios', '/', 0, 0, 0, 0, 0) ; # Unit of Measurement Conversion INSERT INTO fetchmetrics.DOG_Unit_Measurement_Conversion ( id_unit_derived , id_unit_base , display_order , multiplier_unit_base , increment_unit_base , apply_multiplier_before_increment ) VALUES ( 2 -- id_unit_derived , 1 -- id_unit_base , 1 -- display_order , 0.001 -- multiplier_unit_base , 0 -- increment_unit_base , apply_multiplier_before_increment ) , ( 4 -- id_unit_derived , 3 -- id_unit_base , 1 -- display_order , 0.001 -- multiplier_unit_base , 0 -- increment_unit_base , apply_multiplier_before_increment ) , ( 6 -- id_unit_derived , 5 -- id_unit_base , 1 -- display_order , 0.001 -- multiplier_unit_base , 0 -- increment_unit_base , apply_multiplier_before_increment ) , ( 9 -- id_unit_derived , 8 -- id_unit_base , 1 -- display_order , 24 -- multiplier_unit_base , 0 -- increment_unit_base , apply_multiplier_before_increment ) ; -- Project-specific tables INSERT INTO fetchmetrics.DOG_Dog ( name , appearance , mass_kg ) VALUES ( 'Molly' , 'Cute' , 20 ) ; -- Dog User Link INSERT INTO fetchmetrics.DOG_Dog_User_Link ( id_dog , id_user , id_access_level , active ) SELECT DOG.id_dog , USERS.id_user , ROLE_PERMISSION_LINK.id_access_level , 1 FROM fetchmetrics.DOG_User USERS INNER JOIN fetchmetrics.DOG_User_Role_Link USER_ROLE_LINK ON USERS.id_user = USER_ROLE_LINK.id_user INNER JOIN fetchmetrics.DOG_Role_Permission_Link ROLE_PERMISSION_LINK ON USER_ROLE_LINK.id_role = ROLE_PERMISSION_LINK.id_role CROSS JOIN fetchmetrics.DOG_Dog DOG ; INSERT INTO fetchmetrics.DOG_Breed ( code , name ) VALUES ( 'BORDER_COLLIE' , 'Border Collie' ) ; INSERT INTO fetchmetrics.DOG_Dog_Breed_Link ( id_dog , id_breed , lineage_ratio ) VALUES ( 1 , 1 , 1 ) ; /* Removed INSERT INTO fetchmetrics.DOG_Drive ( code , name ) VALUES ( 'PREY' , 'Prey' ) , ( 'PACK' , 'Pack' ) ; INSERT INTO fetchmetrics.DOG_Dog_Drive_Link ( id_dog , id_drive , dominance_ratio ) VALUES ( 1 , 1 , 0.5 ) , ( 1 , 2 , 0.5 ) ; */ /* INSERT INTO fetchmetrics.DOG_Understanding_Level ( code , name ) VALUES ( 'UNKNOWN' , 'Not known' ) , ( 'INTRODUCED' , 'Has been introduced' ) , ( 'RECOGNISES_COMBINED_VISUAL_AND_VERBAL_SIGNAL' , 'Combined visual and verbal signal recognised' ) , ( 'RECOGNISES_VISUAL_SIGNAL' , 'Visual signal alone recognised' ) , ( 'RECOGNISES_VERBAL_SIGNAL' , 'Verbal signal alone recognised' ) , ( 'UNDERSTOOD' , 'Understood' ) ; */ INSERT INTO fetchmetrics.DOG_Command_Category ( code , name ) VALUES ( 'ACTIVITIES' , 'Activities' ) , ( 'BASIC_OBEDIENCE' , 'Basic obedience' ) , ( 'BEHAVIOUR_MODIFICATION' , 'Behaviour modification' ) , ( 'BODY_PARTS' , 'Body parts' ) , ( 'CLOTHING_AND_EQUIPMENT' , 'Clothing and equipment' ) , ( 'COMPARISON' , 'Comparison' ) , ( 'ADJECTIVES' , 'Compliments and insults (adjectives)' ) , ( 'EMOTIONAL_STATE' , 'Emotional state' ) , ( 'ENVIRONMENT' , 'Environment' ) , ( 'ESSENTIAL_NEEDS' , 'Essential needs' ) , ( 'IMPULSE_CONTROL' , 'Impulse control' ) , ( 'LOCATION' , 'Location' ) , ( 'MANNERS' , 'Manners' ) , ( 'MEALTIME' , 'Mealtime' ) , ( 'PARTY_TRICK' , 'Party trick' ) , ( 'PEOPLE' , 'People' ) , ( 'PLAY' , 'Play' ) , ( 'POSITION' , 'Position' ) , ( 'QUESTIONS' , 'Questions' ) , ( 'SERVICE' , 'Service' ) , ( 'TIME_AND_SCHEDULING' , 'Time and scheduling' ) , ( 'UTILITY' , 'Utility' ) ; /* INSERT INTO fetchmetrics.DOG_Command ( code , name ) VALUES ( 'lick' , 'nips' ) ; */ /* INSERT INTO fetchmetrics.DOG_Dog_Command_Link ( id_dog , id_command , id_understanding_level , id_obedience_level , notes ) VALUES ( 'lick' , 'nips' ) ; */ INSERT INTO fetchmetrics.DOG_Command_Modality ( code , name ) VALUES ( 'VISUAL' , 'Visual signal' ) , ( 'VERBAL' , 'Verbal signal' ) , ( 'BUTTON' , 'Button press' ) ; INSERT INTO fetchmetrics.DOG_Location ( code , name ) VALUES ( 'HOME' , 'Home' ) ; /* INSERT INTO fetchmetrics.DOG_Location_User_Link ( id_location , id_user , id_access_level ) SELECT L.id_location , 1 , 3 FROM fetchmetrics.DOG_Location L UNION SELECT L.id_location , 2 , 3 FROM fetchmetrics.DOG_Location L ; */ /* INSERT INTO fetchmetrics.DOG_Location_Link ( id_location_parent , id_location_child ) VALUES ( 1 , 2 ) ; */ INSERT INTO fetchmetrics.DOG_Button_Shape ( code , name , description ) VALUES ( 'ROUND' , 'Round' , 'Cylindrical' ) , ( 'HEXAGONAL' , 'Hexagonal' , 'Hexagonal prism' ) ; INSERT INTO fetchmetrics.DOG_Button_Shape_User_Link ( id_button_shape , id_user , id_access_level ) SELECT BS.id_button_shape , 1 , 3 FROM fetchmetrics.DOG_Button_Shape BS UNION SELECT BS.id_button_shape , 2 , 3 FROM fetchmetrics.DOG_Button_Shape BS ; INSERT INTO fetchmetrics.DOG_Colour ( code , name ) VALUES ( 'RED' , 'Red' ) , ( 'GREEN' , 'Green' ) ; /* INSERT INTO fetchmetrics.DOG_Image ( id_file_type , id_dog , path , display_order ) VALUES ( 1 , 1 , NULL , NULL ) ; INSERT INTO fetchmetrics.DOG_Image ( id_file_type , id_dog , name , path , display_order , active , id_user_created_by ) VALUES ( 2 , 1 , 'Wisp' , 'https://fetch-metrics.co.uk/static/images/Wisp.jpg' , 1 , 1 , 1 ) ; INSERT INTO fetchmetrics.DOG_Image_User_Link ( id_image , id_user , id_access_level ) SELECT I.id_image , 1 , 3 FROM fetchmetrics.DOG_Image I UNION SELECT I.id_image , 2 , 3 FROM fetchmetrics.DOG_Image I ; */ /* INSERT INTO fetchmetrics.DOG_Button_Icon ( id_image , code , name , description ) VALUES ( 1 , NULL ) ; */ /* INSERT INTO fetchmetrics.DOG_Command_Button_Link ( id_command , id_button_shape , id_button_colour , id_button_icon , id_location ) VALUES ( 1 -- AS id_command , 1 -- AS id_button_shape , 1 -- AS id_button_colour , NULL -- AS id_button_icon , 1 -- AS id_location ) ; */ INSERT INTO fetchmetrics.DOG_Weather ( code , name ) VALUES ( 'CLEAR_SUNNY' , 'Sunny and clear' ) , ( 'LIGHTLY_CLOUDY_SUNNY' , 'Sunny with some clouds' ) , ( 'CLOUDY' , 'Cloudy' ) , ( 'RAINY' , 'Raining' ) , ( 'SNOWING' , 'Snowing' ) , ( 'THAWING' , 'Thawing' ) ; INSERT INTO fetchmetrics.DOG_Lighting_Level ( code , name ) VALUES ( 'BRIGHT' , 'Bright' ) , ( 'MODERATELY_BRIGHT' , 'Moderately Bright' ) , ( 'DAWN_DUSK' , 'Dawn or Dusk' ) , ( 'DARK_WITH_SOME_LIGHTING' , 'Dark With Some Lighting' ) , ( 'DARK' , 'Dark' ) ; INSERT INTO fetchmetrics.DOG_Assessment_Type ( code , name , description ) VALUES ( 'PROFESSIONAL_TRAINING' -- code , 'Professional Training Session' -- name , 'Assessment conducted during one-on-one training sessions at the trainer''s facility. Focuses on specific skills development and command training in a controlled environment.' -- description ) , ( 'GROUP' -- code , 'Group Session' -- name , 'Evaluation during group training classes with multiple dogs and owners present. Measures performance in social settings and ability to focus despite distractions from other dogs.' -- description ) , ( 'HOME' -- code , 'Home' -- name , 'Assessment conducted in the dog''s home environment. Evaluates behavior in familiar surroundings and real-world application of training with household distractions and family dynamics.' -- description ) , ( 'COMPETITION' -- code , 'Competition' -- name , 'Evaluation of performance readiness for dog shows, agility competitions, or sporting events. Measures precision, consistency, and performance under competitive pressure.' -- description ) , ( 'QUALIFICATION' -- code , 'Qualification' -- name , 'Formal assessment for certifications such as Kennel Club Good Citizen, therapy dog qualification, or other official standards. Tests specific criteria required for certification approval.' -- description ) /* , ( '' -- code , '' -- name , '' -- description ) */ ; /* INSERT INTO fetchmetrics.DOG_Assessment ( id_weather , id_lighting_level , id_location , id_user_handler , notes , difficulty_level , active ) VALUES ( ) ; */ /* INSERT INTO fetchmetrics.DOG_Distraction_Type_User_Link ( id_distraction_type , id_user , id_access_level ) SELECT DT.id_type , 1 , 3 FROM fetchmetrics.DOG_Distraction_Type DT UNION SELECT DT.id_type , 2 , 3 FROM fetchmetrics.DOG_Distraction_Type DT ; */ INSERT INTO fetchmetrics.DOG_Distraction_Intensity_Level ( code , name ) VALUES ( 'NEGLIGIBLE' , 'Negligible' ) , ( 'MILD' , 'Mild' ) , ( 'MODERATE' , 'Moderate' ) , ( 'STRONG' , 'Strong' ) , ( 'EXTREME' , 'Extreme' ) ; /* INSERT INTO fetchmetrics.DOG_Distraction_Intensity_Level_User_Link ( id_intensity_level , id_user , id_access_level ) SELECT IL.id_intensity_level , 1 , 3 FROM fetchmetrics.DOG_Distraction_Intensity_Level IL UNION SELECT IL.id_intensity_level , 2 , 3 FROM fetchmetrics.DOG_Distraction_Intensity_Level IL ; INSERT INTO fetchmetrics.DOG_Distraction ( id_assessment , id_distraction_type , id_intensity_level_emotional , id_intensity_level_scent , id_intensity_level_sight , id_intensity_level_sound , id_intensity_level_touch , quantity , proximity_metres , active ) VALUES ( ) ; */ /* Removed INSERT INTO fetchmetrics.DOG_Bribe ( code , name ) VALUES ( 'NONE' , 'None' ) , ( 'TREAT' , 'Treat' ) , ( 'FAVOURITE_TREAT' , 'Favourite treat' ) , ( 'TOY' , 'Toy' ) , ( 'FAVOURITE_TOY' , 'Favourite Toy' ) , ( 'SQUEAKY_TOY' , 'Squeaky Toy' ) ; INSERT INTO fetchmetrics.DOG_Bribe_User_Link ( id_bribe , id_user , id_access_level ) SELECT B.id_bribe , 1 , 3 FROM fetchmetrics.DOG_Bribe B UNION SELECT B.id_bribe , 2 , 3 FROM fetchmetrics.DOG_Bribe B ; */ INSERT INTO fetchmetrics.DOG_Reinforcement_Schedule ( code , name , description ) VALUES ( 'CRF' -- code , 'Continuous Reinforcement' -- name , 'Every correct response is rewarded. Best for initial learning of new behaviors. Produces steady, moderate response rates but behavior extinguishes quickly when rewards stop.' -- description ) , ( 'FR' -- code , 'Fixed Ratio' -- name , 'Reward given after a fixed number of responses (e.g., every 5th correct response). Creates high, steady response rates with brief pauses after each reward. Risk of "ratio strain" if requirement is too high.' -- description ) , ( 'VR' -- code , 'Variable Ratio' -- name , 'Reward given after an unpredictable number of responses, averaging around a set number. Produces the highest, most consistent response rates with minimal pauses. Creates persistent behavior that''s resistant to extinction.' -- description ) , ( 'RR' -- code , 'Random Ratio' -- name , 'Reward given randomly with no pattern, maintaining a specific percentage (e.g., 50% of responses rewarded). Prevents the dog from predicting when rewards will come, avoiding systematic response patterns.' -- description ) , ( 'FI' -- code , 'Fixed Interval' -- name , 'First response after a set time period is rewarded. Creates a pattern where responses increase as the time approaches, with long pauses after rewards ("fixed-interval scallop").' -- description ) , ( 'VI' -- code , 'Variable Interval' -- name , 'First response after unpredictable time intervals is rewarded, averaging around a set time. Produces steady response rates without pauses, though generally lower rates than ratio schedules.' -- description ) , ( 'DRE' -- code , 'Differential Reinforcement of Excellence' -- name , 'Only the best quality responses are rewarded, with standards that increase as the dog improves. Continuously raises performance standards rather than rewarding on an all-or-nothing basis.' -- description ) , ( 'DRH' -- code , 'Differential Reinforcement of High Rates' -- name , 'Response is only rewarded if it occurs within a short time after the previous response. Encourages rapid, frequent responding.' -- description ) , ( 'DRL' -- code , 'Differential Reinforcement of Low Rates' -- name , 'Response is only rewarded if sufficient time has passed since the previous response. Encourages slower, more deliberate responding.' -- description ) , ( 'DRO' -- code , 'Differential Reinforcement of Other Behaviors' -- name , 'Any behavior except the target unwanted behavior is rewarded. Used to eliminate problem behaviors by reinforcing alternatives.' -- description ) , ( 'DRI' -- code , 'Differential Reinforcement of Incompatible Behaviors' -- name , 'Only behaviors that cannot occur simultaneously with the unwanted behavior are rewarded. More specific than DRO for eliminating problems.' -- description ) ; INSERT INTO fetchmetrics.DOG_Training_Technique ( code , name , description ) VALUES ( 'SHAPING' -- code , 'Shaping by Successive Approximations' -- name , 'Differentially rewarding behaviors that progressively approximate the desired final response. Each step builds closer to the target behavior through careful observation and timing.' -- description ) , ( 'PROMPTING' -- code , 'Prompting' -- name , 'Using physical manipulation, visual lures, or environmental cues to guide the dog into performing the desired behavior, which is then rewarded.' -- description ) , ( 'AUTOSHAPING' -- code , 'Autoshaping' -- name , 'Allowing classical conditioning to naturally develop the desired behavior by pairing a neutral stimulus with food delivery, causing the dog to direct food-related behaviors toward the stimulus.' -- description ) , ( 'BACKWARD_CHAINING' -- code , 'Backward Chaining' -- name , 'Teaching complex behavior sequences by starting with the final behavior and working backwards, so each step is reinforced by the opportunity to perform the already-learned next step.' -- description ) , ( 'FORWARD_CHAINING' -- code , 'Forward Chaining' -- name , 'Teaching complex behavior sequences by starting with the first behavior and progressively adding subsequent steps in order.' -- description ) , ( 'NEGATIVE_REINFORCEMENT' -- code , 'Negative Reinforcement' -- name , 'Removing an unpleasant stimulus when the correct behavior occurs, strengthening the behavior through escape or avoidance of the aversive stimulus.' -- description ) , ( 'POSITIVE_PUNISHMENT' -- code , 'Positive Punishment' -- name , 'Adding an unpleasant consequence immediately after an unwanted behavior to decrease the likelihood of that behavior recurring.' -- description ) , ( 'NEGATIVE_PUNISHMENT' -- code , 'Negative Punishment' -- name , 'Removing something pleasant (like attention or access to activities) immediately after unwanted behavior to decrease that behavior.' -- description ) , ( 'COUNTERCONDITIONING' -- code , 'Counterconditioning' -- name , 'Changing the dog''s emotional response to a stimulus by pairing it with something pleasant, replacing fear or negative associations with positive ones.' -- description ) , ( 'SYSTEMATIC_DESENSITIZATION' -- code , 'Systematic Desensitization' -- name , 'Gradually exposing the dog to increasing intensities of a fear-provoking stimulus while maintaining relaxation, starting well below the threshold that triggers fear.' -- description ) , ( 'FLOODING' -- code , 'Flooding' -- name , 'Exposing the dog to the full intensity of a feared stimulus while preventing escape responses, allowing the fear response to extinguish through prolonged exposure.' -- description ) , ( 'PROMPT_FADING' -- code , 'Prompt Fading' -- name , 'Gradually reducing and removing prompts (physical, visual, or environmental cues) while maintaining the learned behavior until the dog responds to the final cue alone.' -- description ) , ( 'GENERALIZATION_TRAINING' -- code , 'Generalization Training' -- name , 'Teaching the dog to perform learned behaviors across different contexts, locations, people, and situations to ensure reliable performance everywhere.' -- description ) , ( 'ERRORLESS_DISCRIMINATION' -- code , 'Errorless Discrimination Learning' -- name , 'Teaching discriminations by making the correct choice highly obvious initially, then gradually making the distinction more subtle to minimize errors during learning.' -- description ) , ( 'CONTEXT_VARIATION' -- code , 'Context Variation Training' -- name , 'Systematically changing environmental factors (location, time, distractions, people present) during training to strengthen stimulus control and prevent context dependency.' -- description ) , ( 'HABITUATION_TRAINING' -- code , 'Habituation Training' -- name , 'Repeated exposure to a stimulus until the dog stops reacting to it, teaching the dog that the stimulus is irrelevant and requires no response.' -- description ) , ( 'EXTINCTION' -- code , 'Extinction' -- name , 'Stopping all reinforcement for a previously rewarded behavior to decrease and eventually eliminate that behavior, often accompanied by temporary increases in the behavior.' -- description ) /* , ( '' -- code , '' -- name , '' -- description ) */ ; /* INSERT INTO fetchmetrics.DOG_Assessment_Command_Link ( id_assessment , id_command , id_command_modality , id_bribe , distance_from_handler_metres , is_in_sight_of_handler , is_in_scent_range_of_handler , is_in_hearing_range_of_handler , is_on_lead , trial_count , active ) VALUES ( ) ; */ INSERT INTO fetchmetrics.DOG_Distraction_Type ( code , name ) VALUES ( 'RESTLESSNESS' , 'Restlessness' ) , ( 'LIVE_PREY' , 'Live Prey' ) , ( 'DEAD_PREY' , 'Dead Prey' ) , ( 'VEHICLES_MACHINES' , 'Vehicles and Machines' ) , ( 'EXPLOSION' , 'Explosion' ) , ( 'Treat' , 'Treat' ) , ( 'TOY' , 'Toy' ) , ( 'SQUEAKY_TOY' , 'Squeaky Toy' ) ; INSERT INTO fetchmetrics.DOG_Response_Quality_Metric ( id_unit_measurement , code , name , value_min , value_max ) VALUES ( 8 , 'RESPONSE_TIME' , 'Response Time' , 0 , NULL ) , ( 11 , 'ACCURACY_RATIO' , 'Accuracy Ratio' , 0 , 1 ) , ( 8 , 'COMPLIANCE_DURATION' , 'Compliance Duration' , 0 , NULL ) , ( 11 , 'PRECISION_RATIO' , 'Precision Ratio' , 0 , 1 ) ; /* INSERT INTO fetchmetrics.DOG_Response_Quality_Metric_User_Link ( id_response_quality_metric , id_user , id_access_level ) SELECT RQM.id_metric , 1 , 3 FROM fetchmetrics.DOG_Response_Quality_Metric RQM UNION SELECT RQM.id_metric , 2 , 3 FROM fetchmetrics.DOG_Response_Quality_Metric RQM ; */ INSERT INTO fetchmetrics.DOG_Obedience_Level ( code , name ) VALUES ( 'EAGER' , 'Eager' ) , ( 'FIRM_LOOK' , 'After Firm Look' ) , ( 'POWER_POSE' , 'After Power Pose' ) , ( 'THREATEN_TO_APPROACH' , 'After Threatening to Approach' ) , ( 'LITTLE_MOVE' , 'After Moving a Few Steps' ) , ( 'HALF_APPROACH' , 'After Moving Half Way' ) , ( 'MOST_APPROACH' , 'After Approaching Most of The Way' ) , ( 'TOUCH_COLLAR' , 'After Touching Collar' ) , ( 'RUN_AWAY_AND_RETURN' , 'After Running Away And Returning' ) , ( 'LEAD' , 'After Being Lead by Collar or Lead' ) , ( 'CHECK_BRIBE' , 'After Check or Bribe' ) , ( 'CHECKS_BRIBES' , 'After Multiple Checks and/or Bribes' ) , ( 'REFUSAL' , 'None - Refusal' ) , ( 'REFUSAL_RUN_AWAY' , 'Refused and Ran Away Refusing to Return' ) ; /* INSERT INTO fetchmetrics.DOG_Obedience_Level_User_Link ( id_obedience_level , id_user , id_access_level ) SELECT OL.id_obedience_level , 1 , 3 FROM fetchmetrics.DOG_Obedience_Level OL UNION SELECT OL.id_obedience_level , 2 , 3 FROM fetchmetrics.DOG_Obedience_Level OL ; */ /* Post Excel-insert: SELECT COUNT(*) FROM fetchmetrics.DOG_Command_Temp; CALL fetchmetrics.p_dog_save_command ( 'nipples' , (SELECT GUID FROM fetchmetrics.DOG_Command_Temp COMMAND_TEMP ORDER BY id_temp DESC LIMIT 1) , 1 , 1 ); SELECT * FROM fetchmetrics.DOG_Dog; / * SELECT * FROM fetchmetrics.DOG_Command; * / SELECT * -- DELETE FROM fetchmetrics.DOG_Obedience_Level; / * DELETE FROM fetchmetrics.DOG_Dog_Command_Link; INSERT INTO fetchmetrics.DOG_Dog_Command_Link ( id_dog , id_command , id_understanding_level , id_obedience_level , notes ) SELECT DOG.id_dog , COMMAND.id_command , FROM fetchmetrics.DOG_Dog DOG CROSS JOIN fetchmetrics.DOG_Command COMMAND WHERE DOG.name = 'Molly' * / SELECT * FROM fetchmetrics.DOG_Dog_Command_Link; */