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]--HÃ¥kan Winther, A SQL Azure tip a day – Create a table
([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)"
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
- The worst mistake of computer science
- Is splitting a CSV column into a separate table(enforcing 1nf) unnecessary complication
Recent Publications
- The first paper in the new UNDERSTANDING THE REAL RDM series, Interpretation and Representation of Database Relations is available for ordering here.
- My book, THE DBDEBUNK GUIDE TO MISCONCEPTIONS ABOUT DATA FUNDAMENTALS is available to order here.
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.
- Trump's Repeal of Bipartisan Anti-Corruption Measure Proves He's a Fake: The man who ran as an outsider and champion of the common man plays the stooge for industry
- The End of Facts in the Trump Era: If you connect with America's anger and paranoia, you can steamroll our most sacred institutions without ever having to tell the truth
- Extreme Vetting, But Not for Banks: Trump proves he is a tool for Wall Street after all
- Matt Taibbi's New Book: 'Insane Clown President':Watch Taibbi discuss his new campaign trail diary on 'Democracy Now!'
- Trump Nominee Jay Clayton Will Be the Most Conflicted SEC Chair Ever: America's incoming top cop on finance is literally married to industry
- The Vampire Squid Occupies Trump's White House: After running against Goldman as a candidate, Donald Trump licks the boots of the world's largest investment bank
- Trump SEC Pick Jay Clayton Connected to Mysterious Firm: Putting the fox in charge of the fowl
Upside down and backwards
- Meals on Wheels could feed 5,967 seniors for a year on what Trump's Mar-a-Lago trips cost so far
"The fact is that Assad overtly contravened Obama’s deal and resorted to chemical weapons against civilians only two months into the Trump administration. Assad did so after Trump consistently clarified, before and after his election, that he would not intervene in this or other foreign wars, that he considered Putin an ally in combating ISIS, and that Assad could — for all Trump cared — stay in power." --Trump’s “presidential,” “decisive” launch of a missile strike at Syria
Reality Check
- Mark Zuckerberg More 'division' now than in a long time
- Zuckerberg Sues Hundreds to Get Title for 700 Acre Compound
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.
- Finally Teaching Critical Thinking: Argue for the Holocaust
- HRW Complains Israel, Egypt blocking ... Hamas from harassing and arresting human rights workers
- Taquiya: As predicted, clueless experts are praising Hamas' new charter that changed nothing
- Anti-Semitic post uploaded to social media every 83 seconds
- Most Jewish British students experience anti-Semitism
The Palestinians: Nice people, let's give them a state
- Hamas says Syria gas attack was ‘criminal slaughter‘(it's OK only against Jews)
- Hamas said to acquire highly explosive short-range rockets
- New Palestinian textbooks 'teach students to be martyrs'
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