Wednesday, December 24, 2008

NTS:: Postgres vs. MySQL

I think that Postgres has a lot going for it - judging by this page on Wikipedia there's somethings which using Postgres is an advantage...

I like the idea of triggers, (must look into this), but I believe MySQL has something similar? Would be useful when you want an additive database, which is triggered by an insert on a main database:

index (is updated on INSERT of main)(keeps all information - is a "look-up database")
main (keeps only current items)

XML/Xpath sounds nice too!

Will install and see what the advantages are...

Friday, December 5, 2008

NTS:: Database structure and "flattened MaRC" - hmmm... let's start again

Okay, so I didn't get the whole RDF thing... and what I've come up with below is not that dissimilar to Prism, see this example from HubMed which is really what I had in mind, (but with more elements).

I suppose what I'd like to do is add in some FRBR too...


ROW #
(autoincrement) | RECORD | LINE | ORDER | VALUE
1 | 1 | creator:surname | 001 | Smith
2 | 1
| creator:firstname | 001 | James
3
| 1 | title:entire | 001 | MySQL : Exploring database design
4
| 1 | published:date | 001 | 2004
5 | 1 | published:edition | 001 | [1st]
6 | 1 | published:isbn | 001 | 018524564X
7 | 1 | published:date | 002 | 2006
8 | 1 | published:edition | 002 | 2nd
9 | 1 | published:isbn | 002 | 978018524678X

Thursday, December 4, 2008

NTS:: Database structure and "flattened MaRC" - further thoughts

hmmm... I thought what I'd come up with wasn't entirely new (but didn't know where!)... it's not a huge leap from PubMed data, with a bit of Dublin Core thrown in.

Hopefully I'll get a chance to play with some data, and see how it pans out.

<article pubmodel="Print">

<journal>

<issn issntype="Print">0964-7058</issn>

<journalissue citedmedium="Print">

<volume>15</volume>

<issue>1</issue>

<pubdate>

<year>2006</year>

</pubdate>

</journalissue>

<title>Asia Pacific journal of clinical nutrition</title>

</journal>

</article>

Wednesday, December 3, 2008

NTS:: Database structure and "flattened MaRC"

Thinking about how MaRC works, makes me think that subject (record?), property, value is not enough... or maybe I've not caught on to RDF just yet?

Column structure for a simple database (along the lines of XML and a flattened MaRC structure):

(okay, so this is not going to set the world on fire, but I think it's useable)

ROW #
(autoincrement) | RECORD | LINE | ORDER | VALUE
1 | 1 | creator:surname | 001 | Smith
2 | 1
| creator:firstname | 001 | James
3
| 1 | title:entire | 001 | MySQL : Exploring database design
4
| 1 | published:date | 001 | 2004
5 | 1 | published:edition | 001 | [1st]
6 | 1 | published:date | 002 | 2006
7 | 1 | published:edition | 002 | 2nd

Friday, November 28, 2008

NTS:: PEAR installation for OAI-0.4.1

Log for installing PEAR modules for OAI-0.4.1


\php5>pear config-set http_proxy http://proxy.somewhere.net:8081

config-set succeeded


\php5>pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6

WARNING: "pear/HTTP_Session" is deprecated in favor of "pear/HTTP_Session2"

WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"

WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
Did not download optional dependencies: pear/DB, pear/MDB, pear/MDB2, use --alldeps to download automatically

pear/HTTP_Session can optionally use package "pear/DB" (version >= 1.7.6)

pear/HTTP_Session can optionally use package "pear/MDB" (version >= 1.1.4)

pear/HTTP_Session can optionally use package "pear/MDB2" (version >= 2.0.1)

downloading HTTP_Session-0.5.6.tgz ...

Starting to download HTTP_Session-0.5.6.tgz (15,343 bytes)

.....done: 15,343 bytes

install ok: channel://pear.php.net/HTTP_Session-0.5.6


\php5>pear install channel://pear.php.net/MDB2
downloading MDB2-2.4.1.tgz ...

Starting to download MDB2-2.4.1.tgz (119,790 bytes)

..........................done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1

MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)

MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)

MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)

MDB2: Optional feature oci8 available (Oracle driver for MDB2)

MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)

MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"


\php5>pear install pear/MDB2#mysql
Skipping package "pear/MDB2", already installed as version 2.4.1

pear/MDB2_Driver_mysql requires PHP extension "mysql" No valid packages found install failed

// hmmm not sure if this is because I'm using Windows?


\php5>pear install channel://pear.php.net/HTTP_Session-0.5.6

Ignoring installed package pear/HTTP_Session
Nothing to install

\php5>pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
downloading OAI-0.4.1.tgz ...

Starting to download OAI-0.4.1.tgz (20,791 bytes)
........done: 20,791 bytes
downloading HTTP_Header-1.2.0.tgz ...
Starting to download HTTP_Header-1.2.0.tgz (10,440 bytes)

...done: 10,440 bytes
downloading HTML_Template_IT-1.2.1.tgz ...
Starting to download HTML_Template_IT-1.2.1.tgz (21,565 bytes)

...done: 21,565 bytes
downloading HTTP-1.4.1.tgz ...

Starting to download HTTP-1.4.1.tgz (8,635 bytes)
...done: 8,635 bytes

install ok: channel://pear.php.net/HTML_Template_IT-1.2.1

install ok: channel://pear.php.net/HTTP-1.4.1

install ok: channel://pear.php.net/HTTP_Header-1.2.0

install ok: channel://pear.php.net/OAI-0.4.1


\php5>

Zotero and EndNote

Zotero and EndNote work quite well together... each have their own strengths.

Zotero picks up the embedded RDF in webpages, such as http://elpub.scix.net/cgi-bin/works/Show?_id=351_elpub2008 while you can use EndNote as search client for things like PubMed...

NTS:: PEAR installations for PHP on Windows

Most of my blog postings will be in the form of "note(s) to self" (NTS::), and given that I tend to lose bits of paper, at least this way I'll be able to find them again!

NTS:: PEAR installations for PHP on Windows
I've just been reminded by the fact that when I'm trying to install from the PEAR repository or SourceForge, I must go through this hoop-la:

// do the whole proxy thing...
pear config-set http_proxy http://proxy.somewhere.net:8081

// then install packages...

pear install --ignore-errors channel://pear.php.net/HTTP_Session-0.5.6
"force install even if there were errors"

pear install --soft channel://pear.php.net/HTTP_Session2
"soft install, fail silently, or upgrade if already installed"

pear install --alldeps http://internode.dl.sourceforge.net/sourceforge/oai-pear/OAI-0.4.1.tgz
"install all required and optional dependencies"