<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-219067758233837481</id><updated>2024-09-12T03:06:52.366-03:00</updated><category term="SQLite"/><category term="C#"/><category term="Termopar"/><category term="Android"/><category term="Circuito"/><category term="Conexão"/><category term="Creat Table"/><category term="DELETE"/><category term="Eletrônica"/><category term="INSERT"/><category term="OP07"/><category term="SQLiteCommand"/><category term="Sensor"/><category term="System.Data.Sqlite"/><category term="Temperatura"/><category term="UPDATE"/><title type='text'>Diego Bittencourt</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-215128192123693391</id><published>2011-09-23T12:16:00.001-03:00</published><updated>2011-09-23T12:16:33.568-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Circuito"/><category scheme="http://www.blogger.com/atom/ns#" term="OP07"/><category scheme="http://www.blogger.com/atom/ns#" term="Termopar"/><title type='text'>Eletrônica - Circuito Termopar</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Boa Tarde!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Conforme combinado anteriormente a figura 1 representa o circuito que amplifica dos sinais do termopar para um nível de tensão que possibilite a medição de sua temperatura com facilidade, este circuito, além disso, também compensa a junta fria na qual eu expliquei no artigo anterior.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5QSJWOhlo9dF4AMKBh0Vb6gb0gSI3vc76XtaUuzNerdx028ZbeqPL5UfFsl44X4PPs3FQ4afY66RcuCzuym4sBWG6WI2FHsYhHKfmfvjb169iycLYd22jlVX24EUDbV3kbj8cWowqJ91z/s1600/termopar2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5QSJWOhlo9dF4AMKBh0Vb6gb0gSI3vc76XtaUuzNerdx028ZbeqPL5UfFsl44X4PPs3FQ4afY66RcuCzuym4sBWG6WI2FHsYhHKfmfvjb169iycLYd22jlVX24EUDbV3kbj8cWowqJ91z/s400/termopar2.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;Figura 1 - Circuito Termopar&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Amplificador de Sinal do Termopar:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Esta etapa amplifica o sinal do sensor termopar, além de conter um filtro que limpa os ruídos que o sensor termopar pode conter em sua tensão.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Em sua saída “TERMO”, vamos contar com uma tensão de 1mV por grau centigrado do termopar, sendo que esta tensão pode ser negativa dependo das condições que o termopar estiver operando.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Observa-se que esta etapa de amplificação utilizando o amplificador operacional OP07, amplifica os sinais do termopar tipo T em aproximadamente 24,5 vezes (490K/20K), para outros tipos de termopares ou até mesmo aplicações onde o termopar vá medir uma faixa maior de temperatura que o circuito proposto neste artigo (0°C até 50°C ou 0V até 2,5V).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Segundo o que já vimos até o momento veremos alguns exemplos de temperatura na junta de medida de temperatura, na junta fria e como seria a saída no terminal “TERMO” com estes exemplos:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;1) Sensor termopar = 25°C, Junta fria = 20°C, com estas condições descontando a temperatura da junta fria, o sensor termopar representaria ter 5°C produzindo no terminal “TERMO” uma tensão de +5mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;2) Sensor termopar = 35°C, Junta fria = 10°C, com estas condições descontando a temperatura da junta fria, o sensor termopar representaria ter 25°C produzindo no terminal “TERMO” uma tensão de +25mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;3) Sensor termopar = 5°C, Junta fria = 30°C, com estas condições descontando a temperatura da junta fria, o sensor termopar representaria ter -25°C produzindo no terminal “TERMO” uma tensão de -25mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Amplificador de referencia de junta fria:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;O sensor de temperatura LM35 gera em sua saída 10mV a cada 1°C, sendo que o circuito proposto em sua etapa de amplificação do sensor termopar amplifica o sinal do mesmo até 1mV a cada 1°C, logo para compensar a junta fria do termopar é necessário um ajuste na saída de tensão do LM35, este é o papel do bloco de amplificação do LM35, que na verdade não amplifica mas sim divide esta tensão por 10 e por se tratar de um amplificador operacional montado em uma configuração inversora, seu sinal é dividido e invertido para -1mV °C, sinal este disponibilizado no terminal “AMB” do circuito elétrico da figura 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Veremos alguns exemplos de como seria a saída “AMB” em algumas condições:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;1) Considerando que a temperatura ambiente a qual o LM35 seja 25°C, com isso o sensor LM35 produziria em sua saída uma tensão de +250mV, após a amplificação realizada pelo circuito amplificador inversor a saída “AMB” seria igual a -25mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;2) Considerando que a temperatura ambiente a qual o LM35 seja 0°C, com isso o sensor LM35 produziria em sua saída uma tensão de +0mV, após a amplificação realizada pelo circuito amplificador inversor a saída “AMB” seria igual a -0mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;3) Considerando que a temperatura ambiente a qual o LM35 seja 5°C, com isso o sensor LM35 produziria em sua saída uma tensão de +50mV, após a amplificação realizada pelo circuito amplificador inversor a saída “AMB” seria igual a -5mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Amplificador que Une os Sinais:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Como o diz o próprio nome está etapa é encarregada de unir os sinais produzidos pelas etapas de amplificação anteriores.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Esta etapa conta com um amplificador operacional operando com a configuração subtrator no qual vai amplificar a diferença entre as duas tensões de entrada, sendo que a tensão do terminal “SAIDA” do circuito é dada pela expressão:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;SAIDA = AMB – TERMO * GANHO&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Sendo que o ganho é dado pela razão entre os resistores do circuito (100K e 2k):&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;GANHO = 100 / 2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;GANHO = 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Considerando estas equações vamos analisar alguns exemplos:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;1) Temperatura de junta fria deve ser a mesma temperatura do sensor LM35 neste exemplo 25°C, a Temperatura no nosso sensor termopar será igual a 35°C com isso:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;AMB = -25mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;TERMO= +10mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;SAIDA = -25 – 10 * 50 = 2,5V&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Bom agora vamos pensar desta forma, -25mV – 10mV seria igual a -35mV * 50, a tensão no terminal “SAIDA” seria de -2,5V ao invés de 2,5V positivos ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Seria se estivéssemos falando de um amplificador somador mas esta etapa conta com um amplificador de diferenças não de somas, ou seja, a diferença entre -25 e +10 é de 35mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;2) Temperatura de junta fria deve ser a mesma temperatura do sensor LM35 neste exemplo 30°C, a Temperatura no nosso sensor termopar será igual a 10°C com isso:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;AMB = -30mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;TERMO= -20mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;SAIDA = -30 – 20 * 50 = 1V&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Sendo que a diferença entre, -30mV – 20mV seria igual a -50mV * 50, a tensão no terminal “SAIDA” seria de -2,5V ao invés de 1V positivos ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Como eu disse no exemplo anterior seria se estivéssemos falando de um amplificador somador, mas esta etapa conta com um amplificador de diferenças não de somas, ou seja, a diferença entre -30mV – 20mV é de +10mV pois da primeira tensão para a segunda ouve uma diferença de +10mV.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Contudo, basicamente o circuito proposto acima vai gerar uma tensão de 50mV a cada 1°C que o sensor termopar possuir, desde que o circuito esteja corretamente calibrado, sendo que o circuito possui 3 trimpots para esta calibragem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span style=&quot;font-family: Arial, sans-serif; font-size: 12pt; line-height: 115%;&quot;&gt;Por hoje era isso, em breve estarei preparando mais material sobre eletrônica para postar por aqui.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/215128192123693391/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/boa-tarde-conforme-combinado.html#comment-form' title='8 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/215128192123693391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/215128192123693391'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/boa-tarde-conforme-combinado.html' title='Eletrônica - Circuito Termopar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5QSJWOhlo9dF4AMKBh0Vb6gb0gSI3vc76XtaUuzNerdx028ZbeqPL5UfFsl44X4PPs3FQ4afY66RcuCzuym4sBWG6WI2FHsYhHKfmfvjb169iycLYd22jlVX24EUDbV3kbj8cWowqJ91z/s72-c/termopar2.bmp" height="72" width="72"/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-4735410641462462777</id><published>2011-09-19T19:48:00.001-03:00</published><updated>2011-09-19T20:02:37.393-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Eletrônica"/><category scheme="http://www.blogger.com/atom/ns#" term="Sensor"/><category scheme="http://www.blogger.com/atom/ns#" term="Temperatura"/><category scheme="http://www.blogger.com/atom/ns#" term="Termopar"/><title type='text'>Eletrônica – Sensores Termopar</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Boa noite!&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Vou falar sobre sensores de temperatura termopar, como disse são sensores de medição de temperatura muito utilizados na indústria hoje para a medição de temperaturas em uma faixa de -270C° até 2000C°, como tudo na eletrônica os sensores termopar possuem boas e más caracteriscas, por exemplo, você pode trocar um sensor termopar por outro sensor termopar do mesmo tipo do sensor a ser substituído, não sendo necessário fazer ajuste de calibragem algum no circuito de medição, pois os sensores praticamente possuem a mesma característica. Outra boa característica é o preço de um sensor deste tipo, pois possui uma ampla faixa de medição, podendo ser aplicado em diversas aplicações em diversos ambientes adversos, e ter a certeza de que o sensor vai funcionar perfeitamente, diferentemente de outros sensores como os termistores, ou os sensores de temperatura digitais, que dependendo de sua característica não vão funcionar corretamente em locais com condições adversas.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Um sensor termopar basicamente são dois condutores (fios) de diferentes ligas metálicas, que uma vez unidos, no ponto desta união o condutores vão apresentar uma diferença de potencial(tensão ou voltagem como preferir) em suas extremidades, sendo que esta diferença de potencial vai variar para mais ou para menos conforme a temperatura a que a junta dos dois condutores for exposta.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Esta tensão gerada pela junta do sensor, é uma tensão que gira na ordem do micro volts até algums mili volts quando exposto a uma temperatura alta, segue uma breve descrição de dois tipos de termopares mais utilizados atualmente e que no caso eu já tive contato com os dois tipos:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Tipo T (Cobre / Constantan)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;É dos termopares mais indicados para medições na gama dos -270 °C a 400 °C, porém não é aconselhado a sua utilização em temperaturas altas, acima de 150 200 °C, pois o cobre comessa a deteriorar nesta temperatura, influenciando na precisão do sensor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Termo elemento positivo (TP): Cu100%&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Termo elemento negativo (TN): Cu55%Ni45% (Constantan)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Faixa de utilização: -270 °C a 400 °C&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Tensão produzida: -6,258 mV a 20,872 mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Tipo K (Cromel / Alumel)&lt;/li&gt;
&lt;/ul&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;O termopar tipo K é um termopar de uso genérico. Tem um baixo custo e, devido à sua popularidade estão disponíveis nas mais variadas sondas. Cobrem temperaturas entre os -200 e os 1200 °C, tendo uma sensibilidade de aproximadamente 41µV/°C.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Termo elemento positivo (KP): Ni90%Cr10% (Cromel)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Termo elemento negativo (KN): Ni95%Mn2%Si1%Al2% (Alumel)&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;Faixa de utilização: -270 °C a 1200 °C&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;;&quot;&gt;o&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;f.e.m. produzida: -6,458 mV a 48,838 mV&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Dentre as más características dos termopares se destaca a chamada junta fria, para entender melhor vamos analisar a figura abaixo que vai representar um circuito com um sensor termopar Tipo T:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLWqNhoBT0CgQHW1Eba2vSl_gWHqwLk5pfyM5k8G6LUzsHa3ZSnMLFM0osTMt_MGKHf1ciXsw1vtl0tFy-gdDJEfOrKGkbgt3i9gUnp4h3Kh7160-X4SZcDq8N99BCgqQS0vxWSWlmZCH4/s1600/200px-Seebeck_effect_circuit_2.svg.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLWqNhoBT0CgQHW1Eba2vSl_gWHqwLk5pfyM5k8G6LUzsHa3ZSnMLFM0osTMt_MGKHf1ciXsw1vtl0tFy-gdDJEfOrKGkbgt3i9gUnp4h3Kh7160-X4SZcDq8N99BCgqQS0vxWSWlmZCH4/s1600/200px-Seebeck_effect_circuit_2.svg.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Circuito simples de um Sensor Termopar (&lt;a href=&quot;http://en.wikipedia.org/wiki/Thermoelectric_effect&quot;&gt;fonte&lt;/a&gt;)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Vamos definir o seguinte para entender melhor :&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;A – Condutor de Constantam;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;B – Condutores de Cobre;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;T1, T2 – Juntas de união entre o condutor de Cobre e o condutor de Constantam;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;V – Voltímetro;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Em uma extremidade do Constantam eu possuo uma junta entre o constantam e o cobre formando o T1(junta de medição de temperatura), sendo que este, por exemplo, é o sensor que eu vou utilizar para medir a temperatura de uma caldeira digamos assim, porém a segunda extremidade do constantam vai estar ligada ao equipamento de medição por exemplo e no contato onde o condutor de constantam estiver conectado no aparelho de medição será formado um novo sensor de temperatura(T2), este segundo sensor involuntário se assim podemos chama-lo, vai ser formado porque ali naquele contato será formada querendo ou não uma nova junta entre dois condutores diferentes no caso constantam e outro metal, normalmente cobre. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Com isso teremos dois sensores cada um produzindo uma determinada quantia de tensão equivalemte a temperatura que cada um deles está esposto, com isso a temperatura medida no medidor vai ser errônea porque T2(junta fria) vai influenciar na medida de temperatura que realmente me interessa.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Por exemplo:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;T1 (sensor da caldeira) = 120°C&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;T2(junta fria, que normalmente se encontra a uma temperatura ambiente, ou na temperatura igual a temperatura do aparelho de medição) = 25°C&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Logo a temperatura que será medida pelo aparelho de medição em questão será igual a 95°C (T1 – T2).&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Isso é o que chamamos de junta fria, uma espécie de sensor parasita que se forma (sempre se forma), em um circuito de medição de temperatura que utiliza um sensor termopar.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Logo para resolver este problema normalmente é utilizado um terceiro sensor de precisão que normalmente é localizado junto do contato que faz ligação com o constantam, medindo a temperatura na qual se encontra a junta fria e adicionando esta temperatura a medição final ajustando tais valores para o valor exato da temperatura da caldeira em questão.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Neste artigo fiz uma introdução do que se trata um sensor termopar, no próximo capitulo vou mostrar um pequeno, porém muito eficiente circuito eletrônico para fazer a medida da temperatura de um sensor termopar com a devida compensação de junta fria.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/4735410641462462777/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/eletronica-sensores-termopar.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/4735410641462462777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/4735410641462462777'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/eletronica-sensores-termopar.html' title='Eletrônica – Sensores Termopar'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLWqNhoBT0CgQHW1Eba2vSl_gWHqwLk5pfyM5k8G6LUzsHa3ZSnMLFM0osTMt_MGKHf1ciXsw1vtl0tFy-gdDJEfOrKGkbgt3i9gUnp4h3Kh7160-X4SZcDq8N99BCgqQS0vxWSWlmZCH4/s72-c/200px-Seebeck_effect_circuit_2.svg.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-3255611834890061801</id><published>2011-09-18T23:43:00.006-03:00</published><updated>2012-04-28T13:08:47.299-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="DELETE"/><category scheme="http://www.blogger.com/atom/ns#" term="INSERT"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLite"/><category scheme="http://www.blogger.com/atom/ns#" term="UPDATE"/><title type='text'>C# - Adicionando, Editando e Deletando dados com SQLite</title><content type='html'>Boa Noite!&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Seguindo o artigo da ultima postagem, uma vez que temos uma tabela criada já podemos começar a inserir dado edita-los e posteriormente excluí-los.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Então vamos para a pratica, considerando&amp;nbsp; que já possuímos o banco de dados criado, a tabela CLIENTE criada e a conexão com o banco aberta, vamos adicionar o primeiro registro a nossa tabela, antes disso vamos relembrar a estrutura da tabela cliente e quais os comandos para inserir dados nela.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-US&quot;&gt;Tabela Cliente:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush:sql; toolbar:true;&quot;&gt;CREATE TABLE CLIENTE (cliId INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, cliNome TEXT NOT NULL, cliEmail TEXT NOT NULL)
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;
Para inserir um dado nesta tabela vamos utilizar o comando INSERT:&lt;/div&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;INSERT INTO CLIENTE (cliNome, cliEmail) VALUES (&quot;Diego Bittencourt de Oliveira&quot;, &quot;dbo.oliveira@gmail.com&quot;)&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Observe que não foi definido um cliId, pois este é definido pelo próprio SQLite, sendo que isto é definido na criação da tabela onde o campo cliId foi definido como “AUTOINCREMENT”, logo o código do cliente será atribuído automaticamente.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Em C# os comandos seriam assim:&lt;/div&gt;
&lt;pre class=&quot;brush:csharp;&quot;&gt;objCommand.CommandText = &quot;INSERT INTO CLIENTE (cliNome, cliEmail) VALUES (@cliNome, @cliEmail )&quot;;
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliNome&quot;, &quot;Diego Bittencourt de Oliveira&quot;));
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliEmail&quot;, &quot;dbo.oliveira@hotmail.com&quot;));
objCommand.ExecuteNonQuery();
&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;&quot;&gt;Uma vez que se queira editar este registro recém criado acima, se utiliza o comando UPDADE:&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;UPDATE CLIENTE SET cliNome=&quot;Diego Bittencourt de Oliveira&quot;, cliEmail=&quot;diego_b_oliveira@hotmail.com&quot; WHERE cliId=1
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Obs: a expressão “WHERE cliId=1” indica que somente vamos alterar o registro que for identificado pela chave primaria 1, eu sei que a chave do nosso registro é 1 poque foi o primeiro a ser inserido na tabela CLIENTE que criei como exemplo.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Outra observação seria que no comando update eu poderia apenas modificar uma ou outra variável do registro, assim eu poderia especificar somente a variável que foi alterada sendo que as demais não teriam necessidade de aparecer no comando update.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Em C# os comandos para alterar o registro seriam assim:&lt;/div&gt;
&lt;pre class=&quot;brush:csharp;&quot;&gt;objCommand.CommandText = &quot; UPDATE CLIENTE SET cliNome=@cliNome,  cliEmail=@cliEmail WHERE cliId=@cliId”;
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliNome&quot;, &quot;Diego Bittencourt de Oliveira&quot;));
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliEmail&quot;, &quot;diego_b_oliveira@hotmail.com&quot;));
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliId&quot;, 1));
objCommand.ExecuteNonQuery();
&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Bom agora somente nos falta ver como deletar o nosso registro da tabela cliente, para isso em SQL existe um comando chamado DELELE, que deleta um registro ou mais registros conforme for especificado o comando.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Por exemplo um DELETE pode deletar todos os registros que forem pertencentes a uma determinada cidade ou até mesmo deletar de uma cadastro de dependentes todos os dependentes que forem maiores de 18 anos, no nosso caso vamo deletar o registro 1 do nosso cadastro de clientes:&lt;/div&gt;
&lt;pre class=&quot;brush:sql;&quot;&gt;DELETE FROM CLIENTE WHERE cliId=@cliId&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Em C# os comandos para deletar o registro seriam assim:&lt;/div&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush:csharp;&quot;&gt;objCommand.CommandText = &quot;DELETE FROM CLIENTE WHERE cliId=@cliId&quot;;
objCommand.Parameters.Add(new SQLiteParameter(&quot;@cliId&quot;, 1));
objCommand.ExecuteNonQuery();&lt;/pre&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
Bom basicamente seria isso que gostaria de mostrar neste artigo, no próximo artigo veremos como selecionar os dados inseridos em uma tabela de um banco de dados SQLite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/3255611834890061801/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-adicionando-editando-e-deletando.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/3255611834890061801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/3255611834890061801'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-adicionando-editando-e-deletando.html' title='C# - Adicionando, Editando e Deletando dados com SQLite'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-3979288623402492725</id><published>2011-09-14T22:35:00.004-03:00</published><updated>2011-09-18T16:10:43.653-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Creat Table"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLite"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLiteCommand"/><title type='text'>C# - SQLite Criação de Tabelas</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;Antes de partir para o código em C# para executar uma query e assim criar as tabelas no banco de dados SQLite que neste artigo é o objetivo do mesmo, temos de falar sobre os tipos de dados que o SQLite implementa.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;No SQLite, existem apenas 5 tipos de dados, sendo eles:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;NULL - comum em qualquer outro banco de dados.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;INTEGER - inteiro com sinal, armazenado em 1, 2, 3, 4, 6 ou 8 bytes dependendo da grandeza do valor.&lt;/li&gt;
&lt;li&gt;REAL - valor de ponto flutuante armazenado em 8 bytes.&lt;/li&gt;
&lt;li&gt;TEXT - uma string armazenada usando UTF-8, UTF-16BE ou UTF-16LE.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;BLOB - armazena um blob, como indica o nome.&lt;/li&gt;
&lt;/ul&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;A biblioteca do SQLite implementa recursos de compatibilidade com outros bancos de dados, no site do desenvolvedor essa compatibilidade é tratada como uma espécie de afinidade. Por exemplo, um tipo de dados INT comum em diversos bancos de dados é tratado como um INTEGER no SQLite, abaixo segue uma tabela com uma listagem das afinidades entre os tipos de dados e o SQLite:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoTableGrid&quot; style=&quot;border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;height: 17.0pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;   &lt;td style=&quot;border: solid windowtext 1.0pt; height: 17.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Tipo de Dados de Outros Bancos de Dados&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-left: none; border: solid windowtext 1.0pt; height: 17.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;Tipo de Dados do SQLite&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 12.0pt; mso-yfti-irow: 1;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 12.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;INT &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td rowspan=&quot;9&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 12.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;INTEGER&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 13.5pt; mso-yfti-irow: 2;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 13.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;INTEGER &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.0pt; mso-yfti-irow: 3;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;TINYINT &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.5pt; mso-yfti-irow: 4;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;SMALLINT &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.0pt; mso-yfti-irow: 5;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;MEDIUMINT &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 12.35pt; mso-yfti-irow: 6;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 12.35pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;BIGINT &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 14.0pt; mso-yfti-irow: 7;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;UNSIGNED INT BIG &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.5pt; mso-yfti-irow: 8;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;INT2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 12.0pt; mso-yfti-irow: 9;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 12.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;INT8&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 12.5pt; mso-yfti-irow: 10;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 12.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;CHARACTER (20)&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td rowspan=&quot;8&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 12.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;TEXT&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 12.0pt; mso-yfti-irow: 11;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 12.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;VARCHAR (255) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 10.0pt; mso-yfti-irow: 12;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 10.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;CHARACTER VARYING   (255) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 13.5pt; mso-yfti-irow: 13;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 13.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;NCHAR (55) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 10.5pt; mso-yfti-irow: 14;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 10.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;CHARACTER NATIVA (70) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 14.0pt; mso-yfti-irow: 15;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;NVARCHAR (100) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 15.5pt; mso-yfti-irow: 16;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 15.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;TEXTO &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 16.0pt; mso-yfti-irow: 17;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 16.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;CLOB&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 18;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;BLOB&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 14.5pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;BLOB&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 13.0pt; mso-yfti-irow: 19;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;REAIS&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td rowspan=&quot;4&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 13.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;REAL&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.5pt; mso-yfti-irow: 20;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;DOUBLE &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 11.5pt; mso-yfti-irow: 21;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 11.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;DOUBLE PRECISION &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 17.0pt; mso-yfti-irow: 22;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 17.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;FLOAT&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 10.35pt; mso-yfti-irow: 23;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 10.35pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;NUMERIC&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td rowspan=&quot;5&quot; style=&quot;border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; height: 10.35pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 125.25pt;&quot; valign=&quot;top&quot; width=&quot;167&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;NUMERIC&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 16.0pt; mso-yfti-irow: 24;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 16.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;DECIMAL (10,5) &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 14.3pt; mso-yfti-irow: 25;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.3pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;BOOLEAN &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 16.2pt; mso-yfti-irow: 26;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 16.2pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;DATA &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;height: 14.5pt; mso-yfti-irow: 27; mso-yfti-lastrow: yes;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid windowtext 1.0pt; height: 14.5pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 205.25pt;&quot; valign=&quot;top&quot; width=&quot;274&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;DATETIME&lt;/b&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;o:p&gt;&amp;nbsp;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Basicamente são estes os tipos de dados mais Informações podem ser vistas no site do desenvolvedor do SQLite nesta &lt;a href=&quot;http://www.sqlite.org/datatype3.html&quot;&gt;página&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Partindo para o tema do artigo, vamos estudar como utilizar a classe do System.Data.SQLite, classe esta que executa comandos no banco de dados. O SQLiteCommand é a classe responsável por esta execução de comandos no banco de dados.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;O exemplo abaixo mostra como cria no banco da dados SQLite uma tabela chamada Cliente com três campos cliId, cliNome e o cliEmail, vamos aproveitar a rotina mostrada no ultimo artigo que mostrava como criar e abrir uma conexão com o banco de dados SQLite:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;pre class=&quot;brush:csharp;&quot;&gt;SQLiteCommand objCommand;
SQLiteConnection objConnection; // Objeto de com o arquivo do banco de dados
StringBuilder strConnection = new StringBuilder();// String de com o arquivo do banco de dados
// Busco o Diretório de onde minha aplicação esta sendo executada
string path = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
// pego o caminho de onde a aplicação esta sendo executada concateno o diretório com o nome do 
// arquivo do banco de dados
path = path + @&quot;\BaseDados.db&quot;;
// Comesso a montar a String de Conexão definindo o Data Source
strConnection.Append(&quot;Data Source=BaseDados.db;&quot;);
// Definindo a versão
strConnection.Append(&quot;Version=3;&quot;);
// Verifico se o arquivo do banco de dados existe para criar ou não um novo banco de dados
if (File.Exists(path))
    strConnection.Append(&quot;New=False;&quot;);
else
    strConnection.Append(&quot;New=True;&quot;);
// Defino que quero o arquivo em um formato comprimido para economizar espaço em disco
strConnection.Append(&quot;Compress=True;&quot;);
// adiciono ao objeto de conexão a string de conexão formada
objConnection= new SQLiteConnection(strConnection.ToString());
// Abro o banco de dados
objConnection.Open();
// Crio um novo comando para executar comandos SQL no banco de dados
objCommand = objConnection.CreateCommand();
// Adiciono o comando ao SQLiteCommand
objCommand.CommandText = &quot;CREATE TABLE CLIENTE (cliId INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,&quot; +
                         &quot; cliNome TEXT NOT NULL, cliEmail TEXT NOT NULL)&quot;;
// Executo a Nom Query (nom query porque não está me retornando dados)
objCommand.ExecuteNonQuery();
// Executo o metodo dispose para liberar os recuses que não serão mais utilizados
objCommand.Dispose();
// Fecha a conexão com o banco de dados
objConnection.Open();
// Executo o metodo dispose para liberar os recuses que não serão mais utilizados
objConnection.Dispose();
&lt;/pre&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;O SQLite possui diversas formas de executar este comando&amp;nbsp; de criação de uma tabela nesta &lt;a href=&quot;http://www.sqlite.org/lang_createtable.html&quot;&gt;página&lt;/a&gt; do site do Desenvolvedor do SQLite, o comando de criação de uma tabela também pode ser escrito de outra forma como a mostrada abaixo:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&quot;CREATE TABLE IF NOT EXISTS CLIENTE...&quot; &lt;/span&gt;–&amp;nbsp; Sendo que este comando criaria a tabela cliente caso a não exista no banco de dados.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraph&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Para se excluir uma tabela do banco de dados SQLite, não existe nenhum segredo ele basicamente funciona da mesma forma que funciona em outros bancos de dados:&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&quot;DROP TABLE CLIENTE&quot; &lt;/span&gt;–&amp;nbsp; Exclui a tabela cliente do banco de dados.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%;&quot;&gt;&quot;DROP TABLE IF EXISTS CLIENTE&quot; &lt;/span&gt;–&amp;nbsp; Exclui uma tabela no banco de dados caso a mesma exista.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Bom basicamente é desta forma que criamos e excluímos uma tabela no banco de dados Sqlite, no próximo artigo veremos como inserir dados no SQLite usando os recursos oferecidos pelo componente ADO.NET System.Data.SQLite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/3979288623402492725/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-sqlite-criacao-de-tabelas.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/3979288623402492725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/3979288623402492725'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-sqlite-criacao-de-tabelas.html' title='C# - SQLite Criação de Tabelas'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-8853023729236820387</id><published>2011-09-14T14:34:00.000-03:00</published><updated>2011-09-14T15:18:13.015-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Conexão"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLite"/><category scheme="http://www.blogger.com/atom/ns#" term="System.Data.Sqlite"/><title type='text'>C# - Conexão com o SQLite</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Boa Tarde!&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Hoje vamos começar a ver alguma coisa sobre o SQLite na pratica, utilizando o componente desenvolvido para o Visual Studio &amp;nbsp;(C++, Vb.net ou C#) disponível no site do &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt;, sendo que este componente incorpora a biblioteca do SQLite 3 em seu código fonte, ou seja, não existe dependência da DLL do SQLite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;No site do &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; existe um &lt;a href=&quot;http://sqlite.phxsoftware.com/sqlite.wmv&quot;&gt;Vídeo&lt;/a&gt; que mostra a integração do componente &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; com o Visual Studio.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Nos artigos vamos supor que já tenha sido criado um projeto com Visual Studio C# com referencia a DLL do &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Vamos mostrar neste artigo como fazer a string de conexão com banco de dados SQLite:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;String de conexão Básica&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt; line-height: 115%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Data Source =Arquivo; Version =3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Onde: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Data Source =Arquivo&lt;/b&gt; – é o arquivo do banco de dados, sendo que se o arquivo conter somente o nome do arquivo o componente &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; vai considerar que a localização do arquivo será no mesmo &amp;nbsp;diretório de onde se encontra a DLL do componente &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; se encontra (ex: Data Source =”banco.db”;), porém se for especificado o caminho do arquivo logicamente que o &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; vai procurar o arquivo no caminho especificado.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Version =3&lt;/b&gt; – indica a versão do motor do banco de dados, ou seja, a versão do código fonte puro do SQLite original, sendo que o &lt;a href=&quot;http://sqlite.phxsoftware.com/&quot;&gt;System.Data.Sqlite&lt;/a&gt; é um componente que da ao SQLite as funcionalidades do ADO.NET.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão usando UTF16&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;Data Source =&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #7f7f7f;&quot;&gt;Arquivo&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;; Version =3; UseUTF16Encoding =True;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão especificando senha de Acesso&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Data Source = Arquivo; Version =3; Password =senha;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Onde:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Password =senha&lt;/b&gt; – “senha” especifica a senha de acesso ao banco de dados (ex: Password= “123mudar”). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão para abrir o banco de dados no modo de somente leitura&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #7f7f7f;&quot;&gt;Data &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;Source = Arquivo; Version =3; Read Only =True;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão para criar um novo banco de dados&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Data Source = Arquivo; Version =3; New =True;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão para não criar um novo banco de dados&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Data Source = Arquivo; Version =3; New =False;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;String de conexão indicando que o banco possui um formato comprimido&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: #7f7f7f;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Data Source = Arquivo; Version =3; Compress =True;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Normalmente eu utilizo a rotina abaixo para criar um conexão com meu banco de dados :&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0cm; text-align: justify;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas;&quot;&gt;SQLiteConnection&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; objConnection; &lt;span style=&quot;color: green;&quot;&gt;// Objeto de com o arquivo do banco de dados&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: #2b91af; font-family: Consolas;&quot;&gt;StringBuilder&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt; strConnection = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;StringBuilder&lt;/span&gt;();&lt;span style=&quot;color: green;&quot;&gt;// String de com o arquivo do banco de dados&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Busco o Diretório de onde minha aplicação esta sendo executada&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas;&quot;&gt;string&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt; path = &lt;span style=&quot;color: #2b91af;&quot;&gt;Path&lt;/span&gt;.GetDirectoryName(System.Reflection.&lt;span style=&quot;color: #2b91af;&quot;&gt;Assembly&lt;/span&gt;.GetExecutingAssembly().Location);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// pego o caminho de onde a aplicação esta sendo executada concateno o diretório com o nome do &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;// arquivo do banco de dados&lt;/span&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;path = path + &lt;span style=&quot;color: #a31515;&quot;&gt;@&quot;\BaseDados.db&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Comesso a montar a String de Conexão definindo o Data Source&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;strConnection.Append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Data Source=BaseDados.db;&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Definindo a versão&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;strConnection.Append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Version=3;&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Verifico se o arquivo do banco de dados existe para criar ou não um novo banco de dados&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas;&quot;&gt;if&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt; (&lt;span style=&quot;color: #2b91af;&quot;&gt;File&lt;/span&gt;.Exists(path))&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strConnection.Append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;New=False;&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: Consolas;&quot;&gt;else&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; strConnection.Append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;New=True;&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Defino que quero o arquivo em um formato comprimido para economizar espaço em disco&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;strConnection.Append(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Compress=True;&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// adiciono ao objeto de conexão a string de conexão formada&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;objConnection= &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #2b91af;&quot;&gt;SQLiteConnection&lt;/span&gt;(strConnection.ToString());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;&quot;&gt;&lt;span style=&quot;color: green; font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;// Abro o banco de dados&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0cm;&quot;&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;objConnection.Open();&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 9.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Consolas;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Nas&amp;nbsp;próximas&amp;nbsp;postagens veremos como enviar comandos SQL para o banco de dados SQLite para que&amp;nbsp;possamos&amp;nbsp;ver melhor a performance deste excelente banco de dados.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/8853023729236820387/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-conexao-com-o-sqlite.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/8853023729236820387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/8853023729236820387'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/c-conexao-com-o-sqlite.html' title='C# - Conexão com o SQLite'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-219067758233837481.post-7758611398344565987</id><published>2011-09-12T23:23:00.000-03:00</published><updated>2011-09-12T23:23:46.969-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLite"/><title type='text'>SQLite</title><content type='html'>Boa Noite!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;Vamos Inaugurar o blogue com a primeira de algumas postagens sobre esta biblioteca escrita em Linguagem C, que implementa um poderoso banco de dados amplamente utilizado nos dias em hoje em diversos softwares já consagrados como por exemplo o &amp;nbsp;navegador Google Crome, estando também implementado nativamente nas bibliotecas do SDK QT, uma poderosa biblioteca de desenvolvimento C++, sendo que não podemos nos esquecer do Sistema Operacional Android, que em sua SDK também implementa nativamente as bibliotecas do SQLite.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;A biblioteca SQLite, basicamente implementa um banco de dados em um arquivo, onde ele lê e escreve todas as informações que são submetidas e requeridas através da Linguagem SQL.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;O uso desta biblioteca é recomendado quando não se tem a necessidade dos incontáveis recursos de um Gerenciador de Banco de dados Convencional como o SQL Server, Oracle e Mysql por exemplo. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Sendo que o SQLite é recomentado para aplicações onde:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Sites (com menos de cem mil requisições por dia);&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Dispositivos e sistemas embarcados;&lt;/li&gt;
&lt;li&gt;Aplicações desktop;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Ferramentas estatísticas e de análise;&lt;/li&gt;
&lt;li&gt;Aprendizado de banco de dados;&lt;/li&gt;
&lt;li&gt;Implementação de novas extensões à SQL.&lt;/li&gt;
&lt;/ul&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l2 level1 lfo1; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;O SQLite não é recomendado para aplicações onde:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Sites com muitos acessos;&lt;/li&gt;
&lt;li&gt;Grande quantidade de dados (maior que algumas dúzias de gigabytes);&lt;/li&gt;
&lt;li&gt;Sistemas com grande concorrência;&lt;/li&gt;
&lt;li&gt;Aplicações cliente/servidor.&lt;/li&gt;
&lt;/ul&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l1 level1 lfo2; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Vejamos algumas características do SQLite:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Software livre/domínio público e Multiplataforma;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Mecanismo de armazenamento seguro com transações ACID;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Symbol;&quot;&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Não necessita de instalação, configuração ou administração;&lt;/li&gt;
&lt;li&gt;Implementa a maioria do SQL92;&lt;/li&gt;
&lt;li&gt;O Banco de Dados é guardado em um único arquivo;&lt;/li&gt;
&lt;li&gt;Suporta bases de dados acima de 2 terabytes;&lt;/li&gt;
&lt;li&gt;Sem dependências externas.&lt;/li&gt;
&lt;/ul&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;mso-list: l0 level1 lfo3; text-indent: -18.0pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;O Site do Desenvolvedor do SQLite se encontra no link abaixo:&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;a href=&quot;http://www.sqlite.org/&quot;&gt;http://www.sqlite.org/&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;Nas próximas postagens vamos ver como implementar SQLite junto de aplicações desenvolvidas com C# e mais adiante Android.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://diego-bittencourt.blogspot.com/feeds/7758611398344565987/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/sqlite.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/7758611398344565987'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/219067758233837481/posts/default/7758611398344565987'/><link rel='alternate' type='text/html' href='http://diego-bittencourt.blogspot.com/2011/09/sqlite.html' title='SQLite'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/10489602805874030204</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>