creating a site which needs to communicate with magento database
===

I am currently working on (a part of) a site where people buy an item from a magento based e-commerce website. However, to use that item, they need to go to another website. Basically that "other" website is what I am working on (and doing it via codeigniter)

I dont know much about magento. the only information my website needs from the magento website is some information regarding products (id, name and status). This information will be linked to other tables, i.e the product ID may be a foreign key in a table in my database. I did a little research and was able to figure out how data is stored in the magento database. 

Both websites will be on same server.

Now I have two options which I could think of to get products from the magento website into my website,

first is that I create insert,update and delete triggers for the required tables in the magento website so that when a product is added, modified or deleted, it first tries to do the same on my database, and if successful, continues to do it in the magento database.

second option is that I simply merge the two databases of my website and magento website creating a direct relation link between the tables.

Like I previously stated, I dont know much about magento. So i wanted to know which was the safer, better approach or if there was an approach I diddnt think of. 

Any help would be appreciated. Thanks.