Manning’s ‘MongoDB in Action’ has been updated for version 3.0 – #programming #bookreview

MongoDB in Action, Second Edition

Covers MongoDB version 3.0

Kyle Banker

Manning, paperback

Yes, this updated edition of MongoDB in Action is aimed at software developers. However, the book wisely does not ignore those of us who are more casual users of MongoDB.

Indeed, this is a fine how-to book for MongoDB newcomers and casual users, too, particularly if you are patient and willing to read through an introductory chapter focusing on “MongoDB’s history, design goals, and application use cases.”

Many people, of course, just want to jump straight into downloading the software, running it, and playing with it for a while before getting down to any serious stuff such as application use cases. So this book’s Appendix A is the place to go first, so you can get MongoDB onto your Linux, Mac, or Windows computer.  Then, after MongoDB is installed, you can jump back to Chapter 2 to start learning how to use the JavaScript shell.

After that, things quickly  start getting more “practical.” For example, Chapter 3 introduces “Writing programs using MongoDB.” Here, Ruby is employed to work with the MongoDB API. But the author notes: “MongoDB, Inc. provides officially supported, Apache-licensed MongoDB drivers for all of the most popular programming languages. The driver examples in the book use Ruby, but the principles we’ll illustrate are universal and easily transferable to other drivers. Throughout the book we’ll illustrate most commands with the JavaScript shell, but examples of using MongoDB from within an application will be in Ruby.”

I won’t try to sum up everything in this well-written, 13-chapter book. I have used older, 2.X versions of MongoDB in MEAN stack applications. And, separately, I have worked a bit with Ruby and MongoDB. But in each case, I haven’t needed to learn all that much about MongoDB itself, mainly just ensure that it is storing data that can be accessed in the right place and updated, saved or deleted as needed. So this book, written for 3.0.X (and earlier and later) MongoDB releases is an eye-opener for me and one that I will keep around for reference and more learning now that I have upgraded to 3.2.

Part 1 of MongoDB in Action, 2nd edition “provides a broad, practical introduction to MongoDB.” Part 2 delivers “a deep exploration of MongoDB’s document data model.” Part 3, meanwhile, examines MongoDB “from the database administrator’s perspective. This means we’ll cover all the things you need to know about performance, deployments, fault tolerance, and scalability.”

The book’s author knows that readers with some MongoDB experience will not read the book straight through. Instead, they will tackle chapters in many different orders and will even skip some chapters. And this is okay. MongoDB in Action: Second Edition is a book many of us will be happy to have handy whenever we need to get a better grip on some new aspect of working with this very popular open-source document database.

One cautionary note: The author points out that “as of MongoDB v3.0, 32-bit binaries will no longer be supported.” Of course, some 3.X 32-bit binaries are still out there, and you can install them. But you will get a lot of warning messages from MongoDB. So, download a 64-bit binary if your system will support it.

Si Dunn

Advertisements

Spring Data: Modern Data Access for Enterprise Java – #java #bookreview

Spring Data: Modern Data Access for Enterprise Java
Mark Pollack, Oliver Gierke, Thomas Risberg, Jonathan L. Brisbin and Michael Hunger
(O’Reilly, paperbackKindle)

Big Data keeps getting wider and deeper by the second. And so do the demands for analyzing and profiting from all of those piled-up terabytes.

Meanwhile, the once whiz-bang technology known as the relational database is having a very hard time keeping pace. The sheer amount of data that companies now gather, store, access, and analyze is pushing traditional relational databases to the breaking point.

Many Java developers who are trying to keep these overloaded systems held together with baling wire, also are starting to learn to work with some of the “alternative data stores that are being used in mission-critical enterprise applications,” the authors of Spring Data point out.

A lot of data now is being stored elsewhere and not in relational databases. Yet companies cannot abandon what they have already gathered and invested heavily to access. So they need to keep using and supporting their relational databases, plus some newer, faster, more voracious solutions lumped under the heading “NoSQL databases,” (even though you can query them).

In “the new data access landscape,” the authors note: “there is a revolution taking place, which for data geeks is quite exciting. Relational databases are not dead; they are still central to the operations of many enterprises and will remain so for quite some time. The trends, though, are very clear: new data access technologies are solving problems that traditional relational databases can’t, so we need to broaden our skill set as developers and have a foot in both camps.”

They add: “The Spring Framework has a long history of simplifying the development of Java applications, in particular for writing RDBMS-based data access layers that use Java database connectivity (JDBC) or object-relational mappers.”

Their new book “is intended to give you a hands-on introduction to the Spring Data project, whose core mission is to enable Java developers to use state-of-the-art data processing and manipulation tools but also use traditional databases in a state-of-the-art manner.”

They have organized their 288-page book into six parts and 14 chapters:

Part I – Background

  • Chapter 1 – The Spring Data Project
  • Chapter 2 – Repositories: Convenient Data Access Layers
  • Chapter 3 – Type-Safe Querying Using Querydsl

Part II – Relational Databases

  • Chapter 4 – JPA Repositories
  • Chapter 5 – Type-safe JDBC Programming with Querydsl SQL

Part III – NoSQL

  • Chapter 6 – MongoDB: A Document Store
  • Chapter 7 – Neo4j: A Graph Database
  • Chapter8 – Redis: A Key/Value Store

Part IV – Rapid Application Development

  • Chapter 9 – Persistence Layers with Spring Roo
  • Chapter 10 – REST Repository Exporter

Part V – Big Data

  • Chapter 11 – Spring for Apache Hadoop
  • Chapter 12 – Analyzing Data with Hadoop
  • Chapter 13 – Creating Big Data Pipelines with Spring Batch and Spring Integration

Part 5 – Data Grids

  • Chapter 14 – GemFire: A Distributed Data Grid

“Many of the values that have made Spring the preferred platform for enterprise Java developers deliver particular benefit in a world of fragmented persistence solutions,” states Ron Johnson, creator of Spring Framework. Writing in the book’s foreword, he notes: “Part of the value of Spring is how it brings consistency (without descending to a lowest common denominator) in its approach to different technologies with which it integrates.

“A distinct ‘Spring way’ helps shorten the learning curve for developers and simplifies code maintenance. If you are already familiar with Spring, you will find that Spring Data eases your exploration and adoption of unfamiliar stores. If you aren’t already familiar with Spring, this is a good opportunity to see how Spring can simplify your code and make it more consistent.”

Spring Data definitely is not light reading, but it is well-written, and provides a good blending of procedures, steps, explanations, code samples, screenshots and other illustrations.

Si Dunn

Ethics of Big Data – Thoughtful insights into key issues confronting big-data ‘gold mines’ – #management #bookreview

Ethics of Big Data
Kord Davis, with Doug Patterson
(O’Reilly, paperbackKindle)

“Big Data” and how to mine it for profit are red-hot topics in today’s business world. Many corporations now find themselves sitting atop virtual gold mines of customer information. And even small businesses now are attempting to find new ways to profit from their stashes of sales, marketing, and research data. 

Like it or not, you can’t block all of the cookies or tracking companies or sites that are following you, and each time you surf the web, you leave behind a “data exhaust” trail that has monetary value to others. Indeed, one recent start-up, Enliken, (“Data to the People”), is offering a way for computer users to gain some control over their data exhaust trail’s monetary value and choose who benefits from it, including some charities.

Ethics of Big Data does not seek to lay down a “hard-and-fast list of rules for the ethical handling of data.” The new book also doesn’t “tell you what to do with your data.” Its goals are “to help you engage in productive ethical discussions raised by today’s big-data-driven enterprises, propose a framework for thinking and talking about these issues, and introduce a methodology for aligning actions with values within an organization.”

It’s heady stuff, packed into just 64 pages. But the book is well written and definitely thought-provoking. It can serve as a focused guide for corporate leaders and others now hoping to get a grip on their own big-data situations, in ways that will not alienate their customers, partners, and stakeholders.

In the view of the authors: “For both individuals and organizations, four common elements define what can be considered a framework for big data:

  • “Identity – What is the relationship between our offline identity and our online identity?”
  • “Privacy – Who should control access to data?”
  • “Ownership – Who owns data, can rights be transferred, and what are the obligations of people who generate and use that data?”
  • “Reputation – How can we determine what data is trustworthy? Whether about ourselves, others, or anything else, big data exponentially increases the amount of information and ways we can interact with it. This phenomenon increases the complexity of managing how we are perceived and judged.”

Big-data technology itself is “ethnically neutral,” the authors contend, and it “has no value framework. Individuals and corporations, however, do have value systems, and it is only by asking and seeking answers to ethical questions that we can ensure big data is used in a way that aligns with those values.”

At the same time: “Big data is pushing corporate action further and more fully into individual lives through the sheer volume, variety, and velocity of the data being generated. Big-data product design, development, sales, and management actions expand their influence and impact over individuals’ lives that may be changing the common meanings of words like privacy, reputation, ownership, and identity.”

What will happen next as (1) big data continues to expand and intrude and (2) people and organizations  push back harder, is still anybody’s guess. But matters of ethics likely will remain at the center of the conflicts.

Indeed, some big-data gold mines could suffer devastating financial and legal cave-ins if greed is allowed to trump ethics.

Si Dunn

PostgreSQL: Up and Running – Get a well-guided grip on this powerful, free database software – #bookreview

PostgreSQL: Up and Running
 Regina Obe and Leo Hsu
(O’Reilly,
paperbackKindle)

PostgreSQL is both a powerful open source database system and a very flexible application platform.

“PostgreSQL allows you to write stored procedures and functions in several programming languages, and the architecture allows you the flexibility to support more languages,” this book’s two authors point out.

Indeed: “You can have functions written in several different languages participating in one query.”

Release 9.2 of PostgreSQL hit the web Sept. 10, 2012. Regina Obe’s and Leo Hsu’s fine, 145-page introduction to PostgreSQL focuses on Release 9.1, but describes major 9.2 features, too. And their book definitely can be used to get you up and running. It describes “the unique features of PostgreSQL that make it stand apart from other databases…”, and shows “how to use these features to solve real world problems.”

PostgreSQL is not for every database user, the writers emphasize. “PostgreSQL was designed from the ground up to be a server-side database. Many people do use it on the desktop similarly to how they use SQL Server Express or Oracle, but just like those, it cares about security management and doesn’t leave this up to the application connecting to it. As such, it’s not ideal as an imbeddable database, like SQLite or Firebird.”

It also “does a lot and a lot can be daunting,” they concede. “It’s not a dumb data store; it’s a smart elephant. If all you need is a key value store or you expect your database to just sit there and hold stuff, it’s probably overkill for your needs.”

But after years of using PostgreSQL, the two writers remain unabashed fans. “Each update,” they state in their book, “treats us to new features, eases usability, brings improvements in speed, and pushes the envelope of what is possible with a database. In the end, you will wonder why you ever used any other relational database, when PostgreSQL does everything you could hope for—and does it for free.”

By the way, users of PostgreSQL 8.3 or older need to upgrade ASAP, Regina Obe and Leo Hsu urge. Release 8.3 “will be reaching end-of-life in early 2013,” making support increasingly difficult and expensive.

Si Dunn

FileMaker Pro 12: The Missing Manual – A big but easy how-to guide by two experts – #bookreview #database

FileMaker Pro 12: The Missing Manual
Susan Prosser and Stuart Gripman
(O’Reilly,
paperbackKindle)

The good news is: “FileMaker Pro is the ease-of-use champion.” It avoids common database “jargon words like query, join, and alias.” Instead, the two authors state, it uses “simple concepts like find, sort, and connect.”

So, if it’s so simple, why does this book weigh three pounds and have 924 pages?

Two reasons, both good. The authors – each are FileMaker Pro Certified Developers — do a fine job of explaining the package, from the basics to the most advanced features. And they illustrate their points with a generous number of screen shots, lists of steps, and other learning aids.

“FileMaker Pro databases,” they point out, “can be as simple as a list of the things you need to pack when you’re camping (complete with pictures!) or as complex as a company-wide system for purchasing, sales, inventory, invoicing, shipping, and customer tracking. But all of them essentially work the same way.”

FileMaker Pro 12: The Missing Manual has six parts, and the first two parts (encompassing four chapters and 172 pages) explain and demonstrate how to get started with the software and use it to build and improve your first database.

In Part 3, you move past the beginner stage and into creating and maintaining a relational database, plus handling such choices as field options, layout mechanics, calculations, and using scripts. In Part 4, you learn how to start thinking like a relational database developer and using FileMaker Pro Advanced. Part 5 focuses on database security and integration issues, including managing accounts, sharing databases over the Internet and sharing data with other systems. Part 6 contains four useful appendices, including definitions of FileMaker error codes.

In a powerful package like FileMaker Pro 12, there are plenty of choices and capabilities to explain, and there are few ways to be reasonably “complete” without ending up holding a big pile of how-to pages.

Despite its heft and thickness, however, this excellent Missing Manual is structured to help you move forward at your own pace — whether you want to learn it all or just enough to scrape by at a new workplace.

Si Dunn

New Books for Windows Phone 7 & 7.5 and Microsoft SQL Server 2012 T-SQL – #bookreview

Microsoft Press recently has released two new books, one for developers who work with Windows Phone 7 & 7.5 and the other for newcomers to Microsoft SQL Server 2012 T-SQL. 

Windows Phone 7 Development Internals
Andrew Whitechapel
(Microsoft Press, paperback, Kindle)

Andrew Whitechapel’s hefty new 809-page development internals guidebook focuses on Windows Phone 7 design and architecture and helps you learn best practices for building Windows Phone 7 applications. It is illustrated with numerous screenshots, code examples, and other illustrations.

The book “covers the breadth of application development for the Windows Phone platform, both the major 7 and 7.1/7.5 versions and the minor 7.1.1 version,” Whitechapel writes.

Windows Phone 7 Development Internals is aimed at experienced .NET developers who are familiar with Microsoft Silverlight and want to dig into Windows Phone’s platform design and API surface.

“The Windows Phone 7 release only supports C#,” Whitechapel notes, “and although support for Visual Basic was introduced with the 7.1 SDK, this book focuses purely on C# and XAML.”

In each of the 20 chapters, several features are introduced, and Whitechapel provides “one or more sample [Silverlight] applications and walks you through the significant code (C# and XAML).”

The book’s author is a senior program manager for the Windows Phone Application Platform.

#

Microsoft SQL Server 2012 T-SQL Fundamentals
Itzik Ben-Gan
(Microsoft Press, paperback, Kindle)

Transact-SQL, more commonly known as T-SQL, is the Microsoft SQL Server dialect of the ISO and ANSI standards for SQL. T-SQL code is used to query and modify data in SQL Server 2012.

Itzik Ben-Gan, one of the leading experts on T-SQL, emphasizes that his new book “covers fundamentals [and] is mainly aimed at T-SQL practitioners with little or no experience.” But others who have some T-SQL experience also can find it helpful for filling in gaps in knowledge. The book also is recommended for database administrators, business intelligence (BI) practitioners, report writer, analysts, architects, and SQL Server power users who have “just started working with SQL Server and need to write queries and develop code using Transact-SQL.”

Microsoft SQL Server 2012 T-SQL Fundamentals is structured into 10 chapters. The first chapter provides “Background to T-SQL Querying and Programming. Chapters 2 through 8 examine “various aspects of querying and modifying data.” Chapter 9 looks at concurrency and transactions, and Chapter 10 provides an overview of programmable objects.

The book’s one appendix shows you how to “get started and set up your environment so that you have everything you need to get the most out of this book.” The major discussions include: “Getting Started with SQL Database”; “Installing an On-Premises Implementation of SQL Server”; “Downloading Source Code and Installing the Sample Database”; “Working with SQL Server Management Studio”; and “Working with SQL Server Books Online.”

#

Si Dunn

PHP & MySQL: Novice to Ninja, 5th Ed. – A popular how-to guide updated – #bookreview #in #php #programming

PHP & MySQL: Novice to Ninja, 5th Edition
Kevin Yank
(SitePoint,
paperback, list price $39.95; Kindle edition, list price $29.95)

A key measure of a programming book’s usefulness and popularity is how many times it has been revised and reprinted.

Kevin Yank’s book first was published in 2001 under a different title. Eleven years later, his newly revised fifth edition is now in print and providing up-to-date hands-on guidance for those who want to use PHP and MySQL to create database-driven websites.  (By some estimates, at least 20 million websites worldwide now use PHP.)

Yank points out that “PHP is a server-side scripting language that lets you insert instructions into your web pages that your web server software (in most cases, Apache) will execute before it sends those pages to browsers that request them.”

Meanwhile, “[a] database server (in our case MySQL) is a program that can store large amounts of information in an organized format that’s easily accessible through programming languages like PHP. For example, you could tell PHP to look in the database for a list of jokes that you’d like to appear on your website.”

Yank’s fifth edition shows you how to use PHP to create a working content management system (CMS) that accesses – no surprise here – an online joke database that’s managed with MySQL. (Of course, if you think a simple joke database is lame, you can always modify a few tables and labels and create something more substantial, such as a database of vegetables you hate or celebrities or politicians you consider utterly irrelevant to your life.) 

Building a joke database (or whatever) is a pleasant way to learn the basics of PHP coding and database design and then quickly start improving your knowledge and skills as the CMS project is expanded and given more capabilities.

Yank’s book has 12 chapters and four appendices. The how-to chapters are split into short paragraphs, with numerous short code examples. A link is provided where the book’s code examples can be downloaded in a ZIP archive. And the book’s text is written in a smooth, approachable style.

PHP & MySQL: Novice to Ninja, 5th Edition is “aimed at intermediate and advanced web designers looking to make the leap into server-side programming,” Yank says. He expects readers to be familiar with “simple HTML” but “[n]o knowledge of Cascading Style Sheets (CSS) or JavaScript is assumed or required.”

He adds, however, “if you do know JavaScript, you’ll find it will make learning PHP a breeze, since these languages are quite similar.”

Si Dunn