<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/databases">
  <channel>
    <title>Databases</title>
    <link>https://www.linuxjournal.com/tag/databases</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Reality 2.0 Episode 24: A Chat About Redis Labs (Podcast Transcript)</title>
  <link>https://www.linuxjournal.com/content/episode-24-chat-about-redis-labs-podcast-transcript</link>
  <description>  &lt;div data-history-node-id="1340786" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/Reality2.0-24-wide.jpg" width="1200" height="600" alt="Episode 24: A Chat About Redis Labs (Podcast Transcript) cover" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/katherine-druckman" lang="" about="https://www.linuxjournal.com/users/katherine-druckman" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Katherine Druckman&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p dir="ltr"&gt;&lt;em&gt;Doc Searls and Katherine Druckman talk to Yiftach Shoolman of Redis Labs about Redis, Open Source licenses, company culture and more.&lt;/em&gt;&lt;/p&gt;

&lt;p dir="ltr"&gt;&lt;a href="https://www.linuxjournal.com/podcast/episode-24-chat-about-redis-labs"&gt;Listen to the podcast here.&lt;/a&gt;&lt;/p&gt;

&lt;p dir="ltr"&gt;&lt;strong&gt;Katherine Druckman:&lt;/strong&gt; Hey, Linux Journal readers, I am Katherine Druckman, joining you again for our awesome, cool podcast. As always, joining us is Doc Searls, our editor-in-chief. Our special guest this time is Yiftach Shoolman of Redis Labs. He is the CTO and co-founder, and he was kind enough to join us. We’ve talked a bit, in preparation for the podcast, about Redis Labs, but I wondered if you could just give us sort of an overview for the tiny fraction of the people listening that don’t know all about Redis Labs and Redis. If you could just give us a little brief intro, that’d be great. &lt;/p&gt;

&lt;p dir="ltr"&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yiftach Shoolman:&lt;/strong&gt; Thank you very much for hosting me, first. Redis is an extremely popular in-memory data structure database that’s used by many people as just a caching system, but many of them have shifted from just simple cache to a real database, even in the open source world. Just in terms of numbers, only on Docker Hub, Redis has been launched for almost 1.8 billion times, something like five million every day, so it’s extremely popular. It’s used everywhere. Redis Labs is the company behind the open source. When I say “behind the open source,” we sponsor, I would say, 99% of all the open source activities, if not 100%. We also have enterprise products, which is called Redis Enterprise. &lt;/p&gt;

&lt;p dir="ltr"&gt;It is available as a cloud service on all the public clouds, as well as a fully-managed Redis cloud service, as well as softwares that you can download and install everywhere. This is our story in general. The way we split between open source and commercial, which is today very tricky, is that we keep the Redis core as open-core BSD, by the way. On top of that, we added what we call enterprise layers that allows Redis to be deployed in an enterprise environment in the most scalable and highly available way. We have all the goodies that you need, including active-active, including data persistence layer, etc., all the boring stuff that the enterprise needs, in addition to that, a lot of security features. In addition to that, we extended Redis with what we call modules. Some of them were initially open source, and then we changed the license. This is probably the reason that you called me.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p dir="ltr"&gt;&lt;strong&gt;Katherine Druckman:&lt;/strong&gt; Right. That was in the news, certainly.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/episode-24-chat-about-redis-labs-podcast-transcript" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Fri, 02 Aug 2019 15:40:07 +0000</pubDate>
    <dc:creator>Katherine Druckman</dc:creator>
    <guid isPermaLink="false">1340786 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>FOSS Project Spotlight: Appaserver</title>
  <link>https://www.linuxjournal.com/content/foss-project-spotlight-appaserver</link>
  <description>  &lt;div data-history-node-id="1340271" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/12399f3.jpg" width="800" height="471" alt="""" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/tim-riley" lang="" about="https://www.linuxjournal.com/users/tim-riley" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Tim Riley&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;&lt;em&gt;An introduction to an application server that allows you to build MySQL user interfaces
without
programming.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
Assume you are tasked to write a browser-based, MySQL user interface for the table called CITY.
CITY has two columns. The column names are &lt;code&gt;city_name&lt;/code&gt; and &lt;code&gt;state_code&lt;/code&gt;—each combined are the
primary key.
&lt;/p&gt;

&lt;p&gt;
Your user interface must enable users to execute the four main SQL operations: select, insert,
update and delete. The main characteristics for each operation are:
&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
The select operation needs an HTML prompt form to request a query. It also needs a where
clause generator to select from CITY. After forking MySQL and retrieving the raw rows, it needs to
translate them into an HTML table form.&lt;/li&gt;

&lt;li&gt;
The HTML table form needs to be editable, and user edits need to be translated into update
statements.&lt;/li&gt;

&lt;li&gt;
Each resulting row following the execution of a query is a candidate for deletion.&lt;/li&gt;

&lt;li&gt;
The insert operation needs a blank form. It also needs to translate Apache's common gateway
interface (CGI) into insert statements. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
So, you might create the source file called city.c and type in all the required code. Of course,
relational databases have relations. One city has many persons residing in it. Assume the PERSON
table has the column names of &lt;code&gt;full_name&lt;/code&gt;, &lt;code&gt;street_address&lt;/code&gt;,
&lt;code&gt;city_name&lt;/code&gt; and &lt;code&gt;state_code&lt;/code&gt;. &lt;code&gt;full_name&lt;/code&gt; and
&lt;code&gt;street_address&lt;/code&gt; combined are the primary key (Figure 1).
&lt;/p&gt;

&lt;img src="https://www.linuxjournal.com/sites/default/files/styles/max_1300x1300/public/u%5Buid%5D/12399f1.jpg" width="350" height="350" alt="""" class="image-max_1300x1300" /&gt;&lt;p&gt;&lt;em&gt;
Figure 1. Database Schema of Many Persons Residing in One City&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
Are you going to create the source file called person.c too? What about customer.c, inventory.c,
order.c, ...?
&lt;/p&gt;

&lt;p&gt;
Alternatively, you might create the source files called select.c, insert.c, update.c and
delete.c. Then each of these modules would need as input:
&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
A single table name.&lt;/li&gt;

&lt;li&gt;
The table's additional attributes.&lt;/li&gt;

&lt;li&gt;
The table's column names and additional attributes.&lt;/li&gt;

&lt;li&gt;
A recursive list of related tables.&lt;/li&gt;

&lt;li&gt;
Apache's CGI dictionary output.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
The principle behind Appaserver is this multi-module approach. Appaserver stores table names in a
table. Each table's column names and relations are also stored in tables. Taking the table-driven
concept to the nth degree forms a database of a database. You can glean a detailed understanding
of how the Appaserver database is modeled from &lt;a href="https://appahost.com/appaserver_database_schema.pdf"&gt;https://appahost.com/appaserver_database_schema.pdf&lt;/a&gt;.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/foss-project-spotlight-appaserver" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Fri, 14 Dec 2018 13:00:00 +0000</pubDate>
    <dc:creator>Tim Riley</dc:creator>
    <guid isPermaLink="false">1340271 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>PostgreSQL 10: a Great New Version for a Great Database</title>
  <link>https://www.linuxjournal.com/content/postgresql-10-great-new-version-great-database</link>
  <description>  &lt;div data-history-node-id="1339684" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/Postgresql_elephant.svg_.png" width="465" height="480" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/reuven-m-lerner" lang="" about="https://www.linuxjournal.com/users/reuven-m-lerner" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Reuven M. Lerner&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;&lt;em&gt;Reuven reviews the latest and most interesting features in PostgreSQL
10.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
PostgreSQL has long claimed to be the most advanced open-source relational
database. For those of us who have been using it for a significant amount of time, there's
no doubt that this is true; PostgreSQL has consistently demonstrated its
ability to handle high loads and complex queries while providing a rich set
of features and rock-solid stability.
&lt;/p&gt;

&lt;p&gt;
But for all of the amazing functionality that PostgreSQL offers, there have
long been gaps and holes. I've been in meetings with consulting clients who
currently use Oracle or Microsoft SQL Server and are thinking about using
PostgreSQL, who ask me about topics like partitioning or query
parallelization. And for years, I've been forced to say to them, "Um, that's
true. PostgreSQL's functionality in that area is still fairly weak."
&lt;/p&gt;

&lt;p&gt;
So I was quite excited when PostgreSQL 10.0 was released in October 2017,
bringing with it a slew of new features and enhancements. True, some of
those features still aren't as complex or sophisticated as you might find in
commercial databases. But they do demonstrate that over time, PostgreSQL is
offering an amazing amount of functionality for any database, let alone an
open-source project. And in almost every case, the current functionality is
just the first part of a long-term roadmap that the developers will continue to
follow.
&lt;/p&gt;

&lt;p&gt;
In this article, I review some of the newest and most interesting
features in PostgreSQL 10—not only what they can do for you now, but what
you can expect to see from them in the future as well. If you haven't yet
worked with PostgreSQL, I'm guessing you'll be impressed and amazed by
what the latest version can do. Remember, all of this comes in an open-source package that is
incredibly solid, often requires little or no administration, and which
continues to exemplify not only high software quality, but also a
high-quality open-source project and community.
&lt;/p&gt;

&lt;h3&gt;
PostgreSQL Basics&lt;/h3&gt;

&lt;p&gt;
If you're new to PostgreSQL, here's a quick rundown: PostgreSQL is a
client-server relational database with a large number of data types, a
strong system for handling transactions, and functions covering a wide
variety of tasks (from regular expressions to date calculations to string
manipulation to bitwise arithmetic). You can write new functions using a
number of plugin languages, most commonly PL/PgSQL, modeled loosely on
Oracle's PL/SQL, but you also can use languages like Python, JavaScript, Tcl,
Ruby
and R. Writing functions in one of these extension languages provides you
not only with the plugin language's syntax, but also its libraries, which
means that if you use R, for example, you can run statistical analyses inside
your database.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/postgresql-10-great-new-version-great-database" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Mon, 05 Mar 2018 16:38:22 +0000</pubDate>
    <dc:creator>Reuven M. Lerner</dc:creator>
    <guid isPermaLink="false">1339684 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>SQL Server on Linux</title>
  <link>https://www.linuxjournal.com/content/sql-server-linux</link>
  <description>  &lt;div data-history-node-id="1339424" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/database-152091_640.png" width="544" height="600" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/john-s-tonello" lang="" about="https://www.linuxjournal.com/users/john-s-tonello" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;John S. Tonello&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
When Wim Coekaerts, Microsoft's vice president for open source, took the
stage at LinuxCon 2016 in Toronto last summer, he came not as an adversary, but
as a longtime Linux enthusiast promising to bring the power of Linux to Microsoft
and vice versa. With the recent launch of SQL Server for Linux, Coekaerts is
clearly having an impact.
&lt;/p&gt;

&lt;p&gt;
&lt;a href="https://github.com/PowerShell/PowerShell"&gt;PowerShell&lt;/a&gt; for Linux and
&lt;a href="https://msdn.microsoft.com/en-us/commandline/wsl/install_guide"&gt;bash for
Windows&lt;/a&gt; heralded the beginning, but the arrival
of SQL Server, one of the most popular relational databases out there, offers
Linux shops some real opportunities—and a few conundrums.
&lt;/p&gt;

&lt;p&gt;
Clearly, the opportunity to deploy SQL Server on something other than a Windows
Server means you can take advantage of the database's capabilities without
having to manage Windows hosts to do it. If you're a mostly-Linux shop (or
want to be) and you have customers looking to deploy workloads and applications
that require SQL Server, you now have a true Linux solution.
&lt;/p&gt;

&lt;p&gt;
At the same time, if you're big enough to have cabinets full of database
server hardware, you probably have databases that serve real-time workloads and
databases that underpin your data warehouse. If you're running the latter on
beefy hardware necessary to manage the overhead of both Window Server and SQL
Server, the advent of SQL Server on Linux might give you an alternative.
&lt;/p&gt;

&lt;p&gt;
For instance, you might shift your lower-resource data warehouses to
resource-sipping Linux servers with SQL Server. That could save you on hardware
and migration costs, given that there are no structural differences between SQL
Server running on Windows or Linux.
&lt;/p&gt;

&lt;p&gt;
If you were contemplating shifting your data warehouse from SQL Server to MariaDB
or Oracle to take advantage of Linux hardware savings, you wouldn't have to
fret about the conversion costs. Even though you'd still pay for SQL Server
licenses, you could save on the costs to convert and migrate to make up the
difference.
&lt;/p&gt;

&lt;p&gt;
On the conundrum side, you may ask why you might need Microsoft's offering at
all. Afterall, open-source databases like &lt;a href="http://www.mariadb.org"&gt;MariaDB&lt;/a&gt; (or &lt;a href="http://www.mysql.org"&gt;MySQL&lt;/a&gt;) and &lt;a href="https://www.postgresql.org"&gt;PostgreSQL&lt;/a&gt; are
robust, well tested, free and supported by large communities. Why introduce a
historically closed-source proprietary tool to your open-source environment? SQL
Server 2016 Standard &lt;a href="https://www.microsoft.com/en-us/sql-server/sql-server-2016-pricing"&gt;lists
for about $3,717 per core&lt;/a&gt;, though the Developer and
Express versions are free, with Express able to handle up to 10GB for your
data-driven applications.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/sql-server-linux" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 15 Jun 2017 20:54:12 +0000</pubDate>
    <dc:creator>John S. Tonello</dc:creator>
    <guid isPermaLink="false">1339424 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Stunnel Security for Oracle</title>
  <link>https://www.linuxjournal.com/content/stunnel-security-oracle</link>
  <description>  &lt;div data-history-node-id="1339117" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/hqdefault_0.jpg" width="480" height="360" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/charles-fisher" lang="" about="https://www.linuxjournal.com/users/charles-fisher" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Charles Fisher&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
Oracle has integrated modern Transport Layer Security (TLS) network
encryption into its eponymous database product, and TLS usage no longer
requires the Advanced Security option beginning with the 10.2 database
release. Legacy configurations lacking TLS exchange encrypted passwords,
but the session payload is transmitted in clear text and is intercepted
easily by anyone with control over the intermediate network. Databases holding
sensitive content should avoid clear-text traffic configurations.
&lt;/p&gt;

&lt;p&gt;
It is possible to use the stunnel utility to wrap the Oracle
Transparent Network Substrate (TNS) Listener "invisibly" with TLS
encryption as an
isolated process, and this configuration appears to be compatible both with
Oracle's sqlplus command-line utility and with database links that are
used for distributed transactions between multiple database instances.
There are several benefits to stunnel over the TNS Listener's native TLS
implementation:
&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;
&lt;p&gt;
The stunnel utility can be far less expensive. Older Oracle database
releases required the Advanced Security option to use TLS, which is
licensed at $15,000 per CPU
according to the &lt;a href="http://www.oracle.com/us/corporate/pricing/technology-price-list-070617.pdf"&gt;latest
pricing&lt;/a&gt;,
but TLS is now
included with &lt;a href="https://oracle-base.com/articles/misc/configure-tcpip-with-ssl-and-tls-for-database-connections"&gt;Standard
Edition SE2&lt;/a&gt;.
&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;
The stunnel utility and the associated dependent libraries (that is, OpenSSL)
are patched far more often, and updates can be applied immediately with no
database "bounce" if stunnel is used in an
"inetd" configuration. Oracle
issued eight total &lt;a href="https://oss.oracle.com/ol7/SRPMS-updates"&gt;patched
versions&lt;/a&gt; of OpenSSL in 2015 for Oracle Linux 7.
Database patches are issued only four times per year at regular quarterly
intervals and require instance bounces/outages. An urgent SSL/TLS update
will have lengthy delays when implemented as a database patch (due in part
to an overabundance of caution by most DBAs), but will be far easier to
apply as a simple OS utility patch with no downtime. For this reason,
security-sensitive code that may require immediate updates should be kept
out of the database server whenever possible. The stunnel utility meets
this requirement very well.
&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;
The stunnel utility can run as a separate user and group inside a
"chroot jail" that has limited visibility to the rest of the system.
Oracle's server TLS implementation runs with the full privilege of the TNS
Listener. A compromise of the TLS engine can be drastically less dangerous
if it is confined within a chroot() jail. Privilege separation and chroot()
are well-recognized security techniques, and many security-sensitive
installations likely will disable listener TLS for this reason alone.
&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
Let's proceed with adding stunnel TLS services to Oracle.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/stunnel-security-oracle" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 28 Jul 2016 20:00:00 +0000</pubDate>
    <dc:creator>Charles Fisher</dc:creator>
    <guid isPermaLink="false">1339117 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager</title>
  <link>https://www.linuxjournal.com/content/enterprisedbs-edb-postgres-advanced-server-and-edb-postgres-enterprise-manager</link>
  <description>  &lt;div data-history-node-id="1339040" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/11997f7.png" width="233" height="237" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/james-gray" lang="" about="https://www.linuxjournal.com/users/james-gray" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;James Gray&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;img src="http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1000009/11997f7.png" alt="" title="" class="imagecache-large-550px-centered" /&gt;&lt;p&gt;
The elegance of open source is on full display with new product releases
like &lt;a href="http://enterprisedb.com"&gt;EnterpriseDB&lt;/a&gt;'s (EDB's) new PostreSQL-based database solutions.
On the heels of the significant PostgreSQL 9.5 update come two EnterpriseDB
solutions that take Postgres further, namely EDB Postgres Advanced Server
9.5 and EDB Postgres Enterprise Manager 6.0. 
&lt;/p&gt;

&lt;p&gt;
EDB Postgres Advanced Server
integrates additional capabilities and security into Postgres that large
companies and governments require in order to use it, and this new v9.5
features the following: preconfigured integration with Hadoop and MongoDB, enhanced
security with password profiles, expanded compatibility with Oracle to ease
and speed migrations, and dramatic performance increases through vertical
scaling optimizations. 
&lt;/p&gt;

&lt;p&gt;
Meanwhile, EDB Postgres Enterprise Manager, EDB's
single console for tuning, monitoring and administering large Postgres
deployments, adds enhancements as well in this v6.0 release. These include
Nagios support, failover management, a streaming replication wizard, audit
log alerts and an improved alert UI.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/enterprisedbs-edb-postgres-advanced-server-and-edb-postgres-enterprise-manager" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Wed, 27 Apr 2016 17:00:00 +0000</pubDate>
    <dc:creator>James Gray</dc:creator>
    <guid isPermaLink="false">1339040 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Tune Up Your Databases!</title>
  <link>https://www.linuxjournal.com/content/tune-your-databases</link>
  <description>  &lt;div data-history-node-id="1338980" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/11981mysqlf1.jpg" width="550" height="310" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/shawn-powers" lang="" about="https://www.linuxjournal.com/users/shawn-powers" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Shawn Powers&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
My last full-time job was manager of a university's database
department. Ironically, I know very, very little about databases
themselves. I'm no longer in charge of college databases, but I still
do have a handful of MySQL servers that run my various Web applications. Apart
from &lt;code&gt;apt-get install&lt;/code&gt;, I have no idea how to make databases work.
Thankfully, help is available.
&lt;/p&gt;

&lt;img src="http://www.linuxjournal.com/files/linuxjournal.com/ufiles/imagecache/large-550px-centered/u1002061/11981mysqlf1.jpg" alt="" title="" class="imagecache-large-550px-centered" /&gt;&lt;p&gt;
MySQLTuner is a Perl script that checks your local (or remote) MySQL server
and gives recommendations for improving security and performance. It does
not edit files or actually make changes to the server, but it does give a
very lengthy list of recommendations. If you (like me) are the sort of
person who just tends to copy/paste database setup instructions, running
MySQLTuner is a really good idea.
&lt;/p&gt;

&lt;p&gt;
You can download your copy at &lt;a href="http://mysqltuner.com"&gt;http://mysqltuner.com&lt;/a&gt;. Be sure to read the
documentation to get the most use out of the program. And, if you discover
security problems like the ones shown in my screenshot? Fix them!
&lt;/p&gt;

&lt;p&gt;
Thanks to its ability to help improve and secure MySQL servers that 
otherwise might be vulnerable, MySQLTuner gets this month's Editors' Choice
award. If you're imperfect like me, download a copy today and fine-tune
your databases!
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/tune-your-databases" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 03 Mar 2016 18:54:57 +0000</pubDate>
    <dc:creator>Shawn Powers</dc:creator>
    <guid isPermaLink="false">1338980 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Use Your Database!</title>
  <link>https://www.linuxjournal.com/content/use-your-database</link>
  <description>  &lt;div data-history-node-id="1338974" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/databses_0.jpg" width="100" height="100" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/reuven-lerner" lang="" about="https://www.linuxjournal.com/users/reuven-lerner" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Reuven Lerner&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
I love high-level, dynamically typed languages, such as Python, Ruby
and JavaScript. They're easy—and even fun—to use. They let me
express myself richly, and they lend themselves to code that 
easily can be reused and maintained. It's no surprise that interest in
such languages is on the rise, especially when creating Web
applications.
&lt;/p&gt;


&lt;p&gt;
Now, one of the downsides of these languages is that they tend to execute
more slowly than static languages, such as Java, C# and Go. But for a
very large number of Web applications, this speed difference doesn't
matter, or it is justified by the productivity gain enjoyed by the
engineers, or it can be (somewhat) handled by throwing hardware at the
problem.
&lt;/p&gt;

&lt;p&gt;
However, the fact that dynamic languages run more slowly than their
static counterparts doesn't mean you want to ignore the
speed issue completely. Once you know your way around dynamic languages, as well
the frameworks built in them, you get a sense of what runs quickly
and what doesn't.
&lt;/p&gt;

&lt;p&gt;
In just the past few weeks, however, I've encountered a pattern—or
perhaps I should say, an "anti-pattern"—in the code that several of
my consulting clients had written. This anti-pattern is well known to
experienced developers, but it seems to be less well known than I would
have hoped or expected. That anti-pattern, stated simply, is that you
should have the database do as much work as possible.
&lt;/p&gt;

&lt;p&gt;
There are several reasons for throwing as much as possible at your
database server. First and foremost, your database almost certainly
is written in C, so it's likely to execute more quickly than your
high-level, dynamic code.
&lt;/p&gt;

&lt;p&gt;
Second, your database has been highly optimized through the years, such
that retrieving data from it has been tuned to take into account
memory, disk and the frequency of the retrievals.
&lt;/p&gt;

&lt;p&gt;
Third, although network bandwidth is cheap nowadays, it's not
infinitely fast. This means that although you could, in theory, write a
database query in Ruby that returns a large number of rows and then
filters through them using Enumerate#map, if you have the
database do some of this for you, it can reduce the
amount of data you're retrieving dramatically and, thus, lead to faster application
responses and less network usage.
&lt;/p&gt;

&lt;p&gt;
So in this article, I explore this anti-pattern of doing work in an
application that probably should be done in the database. You'll see how
you can get the same results, but much faster, by applying this rule.
There's obviously no one right way to do things, but having the
database do as much work as possible is likely to make your
applications faster and easier to maintain.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/use-your-database" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 25 Feb 2016 19:30:00 +0000</pubDate>
    <dc:creator>Reuven Lerner</dc:creator>
    <guid isPermaLink="false">1338974 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Django Models</title>
  <link>https://www.linuxjournal.com/content/django-models</link>
  <description>  &lt;div data-history-node-id="1338869" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/django-logo-positive_1.png" width="640" height="223" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/reuven-lerner" lang="" about="https://www.linuxjournal.com/users/reuven-lerner" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Reuven Lerner&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
In my last article, I continued looking at the Django Web framework,
showing
how you can create and modify models. As you saw, Django expects you
to describe your models using Python code. The model description is
then transformed into SQL and compared with any previous version of
the model that might have existed. Django then creates a
"migration",
a file that describes how you can move from one version of the model
definition to the next. A migration is a fantastic tool, one that
allows developers to move their database forward (and backward) in
defined chunks. Migrations make it easier to collaborate with others
and upgrade existing applications.
&lt;/p&gt;
&lt;p&gt;
The thing is, migrations have little or nothing to do with the
day-to-day application that you want to run. They are useful for the
creation and maintenance of your application's models, but in your
application, you're going to want to use the models themselves.
&lt;/p&gt;

&lt;p&gt;
So in this article, I look at Django's ORM (object-relational
mapper). You'll see how how Django allows you to perform all the
traditional CRUD (create-read-update-delete) actions you need and
expect within your application, so that you can use a database to power
your Web application.
&lt;/p&gt;

&lt;p&gt;
For the purposes of this article, I'll be using the "atfapp"
application within the "atfapp" project that I created in last
month's article. The model, of an appointment calendar, is defined as follows in
atfapp/models.py:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
class Appointment(models.Model):
    starts_at = models.DateTimeField()
    ends_at = models.DateTimeField()
    meeting_with = models.TextField()
    notes = models.TextField()
    minutes = models.TextField()
    def __str__(self):
        return "{} - {}: Meeting with {} 
           ↪({})".format(self.starts_at,
                                self.ends_at,
                                self.meeting_with,
                                self.notes)
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;
As you can see, the above model has four fields, indicating when the
meeting starts, ends, with whom you are meeting and notes for before
the meeting starts. The first two fields are defined to be DateTime
fields in Django, which is translated into an SQL TIMESTAMP time in
the database.
&lt;/p&gt;


&lt;h3&gt;
Creating a New Appointment&lt;/h3&gt;

&lt;p&gt;
The easiest and best way to get your hands dirty with Django models is
to use the Django interactive shell—meaning, the Python interactive
shell within the Django environment. Within your project, just type:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
django-admin shell
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;
and you'll be placed in the interactive Python interpreter—or if
you have it installed, in IPython. At this point, you can start to
interact with your project and its various applications. In order to
work with your Appointment object, you need to import it. Thus, the
first thing I do is write:

&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/django-models" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 27 Oct 2015 19:50:28 +0000</pubDate>
    <dc:creator>Reuven Lerner</dc:creator>
    <guid isPermaLink="false">1338869 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Django Models and Migrations</title>
  <link>https://www.linuxjournal.com/content/djangos-migrations-make-it-easy-define-and-update-your-database-schema</link>
  <description>  &lt;div data-history-node-id="1338787" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/django-logo-positive_0.png" width="640" height="223" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/reuven-lerner" lang="" about="https://www.linuxjournal.com/users/reuven-lerner" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Reuven Lerner&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
In my last two articles, I looked at the Django Web application
framework, written in Python. Django's documentation describes it as
an MTV framework, in which the acronym stands for model, template
and views.
&lt;/p&gt;
&lt;p&gt;
When a request comes in to a Django application, the application's URL
patterns determine which view method will be invoked. The view method
can then, as I mentioned in previous articles, directly return
content to the user or send the contents of a template. The template
typically contains not only HTML, but also directives, unique to
Django, which allow you to pass along variable values, execute loops
and display text conditionally.
&lt;/p&gt;

&lt;p&gt;
You can create lots of interesting Web applications with just views
and templates. However, most Web applications also use a database, and
in many cases, that means a relational database. Indeed, it's a rare
Web application that doesn't use a database of some sort.
&lt;/p&gt;

&lt;p&gt;
For many years, Web applications typically spoke directly with the
database, sending SQL via text strings. Thus, you would say something
like:

&lt;/p&gt;&lt;pre&gt;&lt;code&gt;
s = "SELECT first_name, last_name FROM Users where id = 1"
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;
You then would send that SQL to the server via a database client
library and retrieve the results using that library. Although this
approach does allow you to harness the power of SQL directly, it means
that your application code now contains text strings with another
language. This mix of (for example) Python and SQL can become
difficult to maintain and work with. Besides, in Python, you're used to
working with objects, attributes and methods. Why can't you access
the database that way?
&lt;/p&gt;

&lt;p&gt;
The answer, of course, is that you can't, because relational databases
eventually do need to receive SQL in order to function
correctly. Thus, many programs use an ORM (object-relational
mapper), which translates method calls and object attributes into
SQL. There is a well established ORM in the Python world known as
SQLAlchemy. However, Django has opted to use its own ORM, with which
you define your database tables, as well as insert, update and retrieve
information in those tables.
&lt;/p&gt;

&lt;p&gt;
So in this article, I cover how you create models in Django, how you can
create and apply migrations based on those model definitions, and how
you can interact with your models from within a Django application.
&lt;/p&gt;


&lt;h3&gt;
Models&lt;/h3&gt;

&lt;p&gt;
A "model" in the Django world is a Python class that represents a
table in the database. If you are creating an appointment calendar,
your database likely will have at least two different tables:
People and Appointments. To represent these in Django, you create two
Python classes: Person and Appointment. Each of these models is defined
in the models.py file inside your application.
&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/djangos-migrations-make-it-easy-define-and-update-your-database-schema" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 30 Jul 2015 20:10:39 +0000</pubDate>
    <dc:creator>Reuven Lerner</dc:creator>
    <guid isPermaLink="false">1338787 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
