<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" ><channel><title>NewPush &#187; SQL</title> <atom:link href="http://newpush.com/tag/sql/feed/" rel="self" type="application/rss+xml" /><link>http://newpush.com</link> <description>Server Hosting, Data Warehouse Hosting, Collaboration</description> <lastBuildDate>Mon, 30 Jan 2012 15:40:45 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Loading of over 1 Trillion RDF Triples</title><link>http://newpush.com/2011/08/loading-of-over-1-trillion-rdf-triples/</link> <comments>http://newpush.com/2011/08/loading-of-over-1-trillion-rdf-triples/#comments</comments> <pubDate>Tue, 30 Aug 2011 20:52:57 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Business]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[News]]></category> <category><![CDATA[Database]]></category> <category><![CDATA[NoSQL]]></category> <category><![CDATA[RDF Triples]]></category> <category><![CDATA[SQL]]></category><guid isPermaLink="false">http://newpush.com/?p=1183</guid> <description><![CDATA[Franz Inc., a leading supplier of Graph Database technology, with critical support from Stillwater SuperComputing Inc. and Intel, today announced it has achieved its goal of being the first to load and query a NoSQL database with a trillion RDF &#8230; <a href="http://newpush.com/2011/08/loading-of-over-1-trillion-rdf-triples/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><a href="http://www.franz.com/">Franz Inc.</a>, a leading supplier of Graph Database technology, with critical support from Stillwater SuperComputing Inc. and Intel, today announced it has achieved its goal of being the first to <a href="http://www.franz.com/about/press_room/trillion-triples.lhtml">load and query a <b>NoSQL</b> database with a trillion RDF statements</a>. RDF (also known as triples or quads), the cornerstone of the Semantic Web, provides a more flexible way to represent data than relational database and is at the heart of the W3C push for the Semantic Web.</p><p>Dr. Aasman point out: &#8220;NoSQL databases like Hadoop and Cassandra fail on joins. Big Enterprise, big web companies and big government intelligence organizations are all looking into big data to work with massive amounts of semi-unstructured data. They are finding that NoSQL databases are wonderful if one needs access to a single object in an ocean of billions of objects, however, they also find that the current NoSQL databases fall short if you need to run graph database operations that require many complicated joins. A typical example would be performing a social network analysis query on a large telecom call detail record database.&#8221;</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2011/08/loading-of-over-1-trillion-rdf-triples/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Creating Delete Triggers in PostgreSQL</title><link>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/</link> <comments>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/#comments</comments> <pubDate>Mon, 03 Aug 2009 22:31:57 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[PL/PGSQL]]></category> <category><![CDATA[PostgreSQL]]></category> <category><![CDATA[SQL]]></category> <category><![CDATA[Trigger]]></category><guid isPermaLink="false">http://www.wdream.com/2009/08/creating-delete-triggers-in-postgresql/</guid> <description><![CDATA[One of the common data integrity issues that can happen in a database is the unintended deletion of a row. Here is how to create a DELETE trigger in PostgreSQL. The example code below assumes you have a &#8220;customer_cus&#8221; table &#8230; <a href="http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>One of the common data integrity issues that can happen in a database is the unintended deletion of a row.  Here is how to create a DELETE trigger in PostgreSQL.</p><p>The example code below assumes you have a &#8220;customer_cus&#8221; table and a &#8220;customer_archive_cua&#8221; table with at least two fields.  It is a good idea to add a timestamp field to the archive table with DEFAULT now(), so that the date of deletion is captured.<br /> <code><br /> CREATE FUNCTION archive_customer() RETURNS TRIGGER AS '<br /> BEGIN<br /> INSERT INTO customer_archive_cua (name_cua, address_cua)<br /> VALUES (OLD.name_cus,OLD.address_cus);<br /> RETURN NULL;<br /> END;<br /> ' LANGUAGE 'plpgsql';<br /> CREATE TRIGGER customer_archive_on_delete AFTER DELETE ON customer_cus<br /> FOR EACH ROW EXECUTE PROCEDURE archive_customer();<br /> </code></p><h4>References</h4><ul><li><a href="http://www.amazon.com/gp/product/0672327562?ie=UTF8&#038;tag=wdr-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=0672327562">PostgreSQL (2nd Edition) (Developer&#8217;s Library)</a><img src="http://www.assoc-amazon.com/e/ir?t=wdr-20&#038;l=as2&#038;o=1&#038;a=0672327562" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></li></ul><p><iframe src="http://rcm.amazon.com/e/cm?t=wdr-20&#038;o=1&#038;p=8&#038;l=as1&#038;asins=0672327562&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/08/creating-delete-triggers-in-postgresql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>DB2 INSERT INTO vs SELECT INTO</title><link>http://newpush.com/2009/01/db2-insert-into-vs-select-into/</link> <comments>http://newpush.com/2009/01/db2-insert-into-vs-select-into/#comments</comments> <pubDate>Tue, 27 Jan 2009 18:19:24 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[insert]]></category> <category><![CDATA[insert into]]></category> <category><![CDATA[into]]></category> <category><![CDATA[select]]></category> <category><![CDATA[select into]]></category> <category><![CDATA[SQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/57</guid> <description><![CDATA[In DB2 if you need to populate a table, you need to use INSERT INTO, like in this example: INSERT INTO new_table SELECT col1,col2 FROM source_table WHERE col1='something'; and if you need to populate query variable, you need to use &#8230; <a href="http://newpush.com/2009/01/db2-insert-into-vs-select-into/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>In <b>DB2</b> if you need to populate a table, you need to use INSERT INTO, like in this example:</p><pre>INSERT INTO new_table
SELECT col1,col2 FROM source_table
WHERE col1='something';
</pre><p>and if you need to populate query variable, you need to use SELECT INTO, like in this example:</p><pre>SELECT * INTO :var1, :var2, :var3FROM table_name
WHERE col1= 'something'; </pre><p>Source: <a href="http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp">DB2 Documentation</a></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/01/db2-insert-into-vs-select-into/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Drop Index in MySQL takes forever</title><link>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/</link> <comments>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/#comments</comments> <pubDate>Sun, 04 Jan 2009 04:39:16 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[drop index]]></category> <category><![CDATA[myisamchk]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[SQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/22</guid> <description><![CDATA[Even though for our core systems we have migrated most databases to DB2, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &#160; One of the MySQL features that I recently noticed is &#8230; <a href="http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Even though for our core systems we have migrated most databases to <b>DB2</b>, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &nbsp; One of the MySQL features that I recently noticed is that dropping indexes on sizable tables takes forever.&nbsp; That is apparently due to a convoluted indexing process in MySQL.&nbsp; The workaround was found here: <a href="http://lists.mysql.com/mysql/202489">MySQL General Discussion List</a></p><p>It goes as follows:<pre>1) create table T1 like T;This creates an empty table T1 with indexes ndx1,ndx2,ndx3 and ndx4.2) alter table T1 drop index ndx3;This drops index ndx3 on the empty T1, which should be instantaneous.3) insert into T1 select * from T;This will populate table T and load all three(3) indexes for T1 in one pass.4) drop table table T;5) alter table T1 rename to T;</pre><p> An alternative ugly hack is to start the drop index, kill the database server.&nbsp; That will crash the table on which the drop index was.&nbsp; The crashed table can be recovered by running mysiamchk.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Escape SQL apostrophe</title><link>http://newpush.com/2008/10/escape-sql-apostrophe/</link> <comments>http://newpush.com/2008/10/escape-sql-apostrophe/#comments</comments> <pubDate>Wed, 15 Oct 2008 21:56:44 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[escape]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[SQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/14</guid> <description><![CDATA[Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.&#160; Usually you can use a function in the driver that can take care of that.&#160; However, if all you need is too escape &#8230; <a href="http://newpush.com/2008/10/escape-sql-apostrophe/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Many drivers have ways to escape SQL strings to make sure no malicious activity is going on.&nbsp; Usually you can use a function in the driver that can take care of that.&nbsp; However, if all you need is too escape a single quote, you can also use the double quote method:<br />&nbsp;<pre>reliability is key to gain customers' loyalty</pre><p>becomes<pre>reliability is key to gain customers'' loyalty</pre>]]></content:encoded> <wfw:commentRss>http://newpush.com/2008/10/escape-sql-apostrophe/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: newpush.com @ 2012-02-06 08:27:14 by W3 Total Cache -->
