It also takes pains to keep the information secret. Some of the systems it uses are custom-built and designed by its own employees, the better to keep competitors off the trail. Companies that sell equipment and software to Wal-Mart are bound by nondisclosure agreements. Three years ago, Wal-Mart summarily announced that it would no longer share its sales data with outside companies, like Information Resources Inc. and ACNielsen, which had paid Wal-Mart for the information and then sold it to other retailers.

"When you look at their behavior, you can tell that Wal-Mart considers data to be a top priority," said Christine Overby, a senior analyst for consumer markets at Forrester Research. Over the years, she said, Wal-Mart executives have spent handsomely for their systems, paying $4 billion in 1991 to create Retail Link and signing onto innovations like bar codes and electronic data interchange, a forerunner of the Internet, well ahead of the pack. Wal-Mart is also driving manufacturers to invest in radio frequency identification. By next October, the company will require its biggest suppliers to tag shipments to some of its distribution centers with tiny transmitters that would eventually let Wal-Mart track every item that it sells.

With so much data at Wal-Mart's corporate fingertips, what are the risks to consumers? Most have no clue that their habits are monitored to such an extent. There are no signs -- like the ones for Wal-Mart's anti-shoplifting cameras -- advising customers that information is being collected and stored. And there is no giveback: Wal-Mart doesn't use loyalty cards and rarely offers promotions based on past purchases.

It is aware, however, that shoppers are concerned about privacy. On its Web site, Wal-Mart posts a privacy policy that states, in part: "We take reasonable steps to protect your personal information. We maintain reasonable physical, technical and procedural measures to limit access to personal information to authorized individuals with appropriate purposes."

NOT everyone agrees. "People don't know that Wal-Mart is capturing information about who they are and what they bought, but they are also capable of capturing a huge amount of outside information about them that has nothing to do with their grocery purchases," said Katherine Albright, the founder and director of Caspian, a consumer advocacy group concerned with privacy issues. "They can find out your mortgage amounts, your court dates, your driving record, your creditworthiness."

One source of information can be a credit card or a debit card, Ms. Albright said. Wal-Mart shoppers increasingly use the cards to pay for purchases, particularly in the better-heeled neighborhoods where the company has been building stores recently.

Some companies specialize in what is known as data enhancement, in which a customer's name and address, or a telephone number, can open the door to additional information. "If Wal-Mart had a customer database and wanted to start e-mailing their customers, we could append their e-mail addresses," said Sarah Stansberry, director of marketing for AccuData America, a company based in Fort Myers, Fla., that specializes in such services but does not use credit card records. With e-mail addresses, AccuData can track names and home addresses, she added. Other information follows: "We can access what they paid for their house, and their mortgage," though not driving records. The company has not done any work for Wal-Mart, she said.