Saturday, April 15, 2017

This Week



Database Truth of the Week

"... systems of operations on data are most effective when they are formalisms, in which semantic considerations are unimportant until the formalism is applied to some specific application. In this way, database processing can join the ranks of successful mathematical abstractions. Differential equations, for instance, can be applied to situations ranging from orbit calculations to the quantum mechanics of the atom. The semantics of each application is unique to that application, but the formalism of differential equations is common. The power of the formalism lies in its abstraction from issues of meaning." --H. T. Merrett, Extending the Relational Algebra to Capture Less Meaning


What's Wrong With This Database Picture?

"When you design your database tables there are some important things to think of, like:
- Normalize to remove redundant data
- Use the smallest datatype possible
- Create as few indexes as possible, but not too few
- Avoid redundant indexes
- Every table must have clustered index
...
This is important in a normal database but it is even more important in SQL Azure because you have limited space for every database, your connections may be terminated due to heavy use of resources, you pay for what you use and the data that you transfer. You can use the SQL Azure management portal do design your tables or write the T-SQL statement yourself. The syntax to create a table in SQL azure is the same as in SQL server 2005/2008, but not all options are supported in SQL Azure.
...

CREATE TABLE [dbo].[table1]
 ([id] [int] IDENTITY(1,1) NOT NULL,
  [column1] [NVARCHAR](50) NOT NULL,
  [column2] [NVARCHAR](15) NOT NULL,
  [column3] [TINYNT] NULL,
  CONSTRAINT [pk_table1] PRIMARY KEY CLUSTERED ([id] ASC )
   WITH (-- PAD_INDEX = OFF,
            STATISTICS_NORECOMPUTE = OFF,
            IGNORE_DUP_KEY = OFF,
         -- FILLFACTOR=80,
         -- ALLOW_ROW_LOCKS = ON,
         -- ALLOW_PAGE_LOCKS = ON,
         -- DATA_COMPRESSION=PAGE)"
--HÃ¥kan Winther, A SQL Azure tip a day – Create a table

To Laugh or Cry?

"Although managing data in relational database has plenty of benefits, they’re rarely used in day-to-day work with small to medium scale datasets. But why is that? Why do we see an awful lot of data stored in static files in CSV or JSON format, even though they are hard to query and update incrementally? The answer is that programmers are lazy, and thus they tend to prefer the easiest solution they find. And in Python, a database isn’t the simplest solution for storing a bunch of structured data. This is what dataset is going to change!
dataset provides two key functions that make using SQL databases in Python a breeze:
  • A simple abstraction layer removes most direct SQL statements without the necessity for a full ORM model - essentially, databases can be used like a JSON file or NoSQL store.
  • Database contents can be exported (frozen) using a sophisticated plain file generator with JSON and CSV support. Exports can be configured to include metadata and dynamic file names depending on the exported data. The exporter can also be used as a command-line tool, datafreeze."  
 --dataset databases for lazy people

Of Interest


Recent Publications

Reviews

Housekeeping


  • I am adding a Database Truth of the Week.  
  • I am merging the Quote of the Week with the To Laugh or Cry article link--the former will be out of the latter from now on.

 

And now for something completely different


This week @The PostWest: If the US were still a republic, it would be a banana one.


My Take: With a fitting president too. Nobody is better at exposing the clotheslessness of king Trump and its kingdom than Matt Taibbi.

Upside down and backwards

Reality Check

Book of the Week (Order via this link to support this site)

Thomas M. Nichols THE DEATH OF EXPERTISE - THE CAMPAIGN AGAINST ESTABLISHED KNOWLEDGE AND WHY IT MATTERS

Anti-semitism? Nah, just criticism of Israel policies.

The Palestinians: Nice people, let's give them a state



Note: I will not publish or respond to anonymous comments. If you want to say something, stand behind it. Otherwise don't bother, it'll be ignored.

No comments:

Post a Comment

View My Stats