created function and sql question for   "check if shelves exist, if not insert shelf."