Wednesday, April 17, 2013

Query XML data type

First, let me share the background story. Books were written in various language. In our library, there are book in Malay, Arabic, English and etc. The most is Arabic I think. The information of a book such as title, author, ISBN, barcode, language, subject, call number and so on were kept in MARC. MARC is Machine Readable Catalog. I will share on MARC later. MARC were kept in database in a field with longtext data type in an XML format.

 So, my task is to generate a statistic based on item's language.

  

I did successfully produce the statistic by manipulationg some PHP pre-defined function such as explode.. *_*

  

However, when it comes to huge data for example statistic for every item in the library (currently our library hold more than 50 000 items and a lot more thousands to come ) .... it stop!!! :( 

To access more than 50 000 MARCs just to get that tiny info each. Huh.... I know it must  a better and clever way to do it precisely and most important is the query performance. I'm keen to know 'how to query XML data type' even I'm not sure does it really help. At least I try. Once I got the solution, I will definitely paste it here.. 

Ok.. work hard, pray a lots..

Monday, April 15, 2013

Overdue Item that aren’t yet overdue


Currently we are using KOHA version 3.10. Previous version used is 3.06.

Problem reported :
Tarikh hari ini jadi "Over Due". Sepatutnya tarikh selepas itu iaitu esok.
 

Cause
 
 
 
Solution
I'm not sure whether this is the right solution. The ideas are :
  1. Update data type for field date_due from date to datetime
  2. Update records for date_due >= today, set the date as it is plus time 23:59 (Just to rectify existing records with 00:00 time. Dont bother about record with date_due < today, they are no doubt overdue.)
  3. Done



As for now, it works well. The following incoming record will automatically record date_due in datetime format.

Alhamdulillah. Case settle! Yeayy... lompat bintang.... ;P

Shift the focus



http://www.samaritanhealth.com/library/images/stories/Front_Page_Images/koha_logo_001-sized.jpg

I just wanna shift the focus of my writing in this blog to my new interest.... KOHA.

 I'm in love with KOHA since the first week the responsibility put on me. Although i would say i'm not happy working on it before due to several reasons. In fact i felt sooo.... guilty to the library and my employer for I don't know what to do. It is not that I don't want to do it, but the matter is I don't know how to do it. People say, try and error. Yup.... I ended up with error for every trial. :(


 Now the air was different. May Allah the Almighty give me courage, strength & determination to pay back all the years that i've cause them trouble. I didn't mean it... seriosly. The spirit has come and i hope it will stay forever till success. InsyaAllah..


 So, the upcoming entries obviously will be more on KOHA. Just for my own resources and future references. It is my pleasure if it will benefit others too. ^_*


 Tribute to Library

First of all, deep down in my heart i would like to apologize on my weaknesses for not being able to provide an owesome KOHA for you guys. Second, I would like to say THANK YOU very much to library staffs (En. Lukman, En.Azizi and few more) for being very patient with me. Hey... they've got a new BIG BOSS, En. Abu Hassan.. hehe... knowing him i would say that : I'm very confident under the leadership of him. Seriously!