We’ve seen how to create and retrieve data from our Firebase database using some simple code to populate our database with a bunch of salads. Utilizing the idea of anonymous users, your app should always be either logged in as a real user or an anonymous user.So now we will create a shopping cart for our users to demonstrate updating and deleting data in real time. This means that you always have access to a Unique User Id.We will use this value to create a new node in our Firebase database: This is great for updating our shopping cart, but we also want to watch our shopping cart so that we can make changes on the screen to synchronize with these persistent changes.We do this by using the new paradigm in Firebase Database to listen for changes to the current user’s shopping cart.Instead of the UPDATE query you should use: DELETE FROM contacts WHERE id=’$id’ This would then be used with the connection and confirmation code as above.At this time it seems appropriate to mention another use of loops with a database.
Microsoft Office Access 2007 provides a number of tools for updating existing records, including datasheets, forms, queries, find-and-replace, and the new Data Collection feature.
You could even commit a major faux pas by trying to contact someone who has died.
Other good reasons for regularly cleaning your data include deleting duplicate records and ensuring spellings are correct.
That is the power of the real-time database at work.
This update was published in Small Business Update - August 2013 Small Business Update from Atom Content Marketing is a monthly magazine for people running their own business.