The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

On fundamental database operations

Submitted by nk on Sat, 2009-12-05 13:20

All databases I am aware of work based on CRUD: Create, Read, Update, Delete. Drupal always wanted to implement all of them nicely and now we have a nice Read in Drupal 7 with entity loading. Delete API has a very long and very sad history which I won't get into but we tried to introduce Delete API to make undo possible. As teached by many excellent usability books, confirm forms are wrong, they become habitual and are just a nuisance instead of protecting you from mistakes. The computer should just do what its operator says and make it possible to revert easily. Because of that history, the issue laid dormant for long but when I was preparing for my MongoDB talk and read an article it struck me immediately as Right. Let me quickly recap: you want Create, Read and Archive and nothing else. When storage is abundant there is no reason to throw away data. We already have Read with entity loading -- so I propose to implement Create and Archive in Drupal 8 nicely and build undo on top.

Ps. if you really insist on storage scarcity then write a contrib that runs a cleanup cronjob that deletes old data from the archives.

Commenting on this Story is closed.

Submitted by BojhanSomers (not verified) on Sat, 2009-12-05 14:40.

I must say, I would love if we could do this in Drupal 8. As said confirmation forms, rarely prevent people from actually making mistakes - its only after the deed that one wishes to revert. A good framework for that could only really flourish if it comes from core.

Submitted by dmitrig01 on Sat, 2009-12-05 20:01.

Not everyone has the capability of just adding more and more and more and more data. What does one do in a situation pressed for memory?

Submitted by greggles (not verified) on Sat, 2009-12-05 20:10.

This is already addressed in chx post about the contrib to do the delete. To be sensible, core could even have a "delete archived items after X days" setting that defaults to 30 days, but really a contrib would be fine. The truth is that most Drupal databases take up an amazingly small amount of space and that reducing their contents do not significantly impact disk space and read/write speeds.

Submitted by Scott Reynolds (not verified) on Sat, 2009-12-05 22:02.

Create an "Empty trash"?

How is this done in Operation systems and what are their motivations? Can we learn from their approach and apply some of their concepts to CMS?

My first reaction was a "no this seems and feels like a bad idea. When I say delete I mean delete." but big guys like Apple and Microsoft have a large budget for UX development and they implemented this. Does CMS -> OS comparison hold water in this use case?

/me has no good answers but willing to listen.

Submitted by marcvangend (not verified) on Sat, 2009-12-05 21:43.

I agree with your point about undo's and confirmation forms, but I disagree with the "nothing else" part. Archiving instead of deleting could be considered a 'sensible default', but we cannot simply assume that everybody has unlimited storage. Even if storage is abundant, there can be good reasons to delete (ie. legal reasons; sometimes you are not allowed to keep data after a certain period). It's just too easy to say "core doesn't do that, see you in contrib". I am certain that Drupal can do better than that.

Submitted by nk on Sat, 2009-12-05 22:34.

For eight years. I won't have any of this. We will have a sensible default (archive) and from there you can go and delete if you so fancy in a contrib. I said already so and that's about it. A lot often keeping all changes are better anyways.

Submitted by PieterDC (not verified) on Sat, 2009-12-05 22:05.

Archive and Undo functionality would be super nice!

Submitted by Bevan on Sun, 2009-12-06 05:37.

In some ways we already have this functionality in Drupal core with node revisions, if you set the node type to "create a new revision" by default. But we don't call it "Archive" and "Undo", it doesn't really archive (the old revision sits next to the current one in the same table) and it only applies to node bodies, titles and CCK fields.

So the feature and technology is not that hard – we are more than half way there for node content. The problem is to implement it for all data objects in Drupal; Users, comments, webform submissions, views, this contrib module, that contrib module, etc etc. – that requires a lot more coding time.

Submitted by moshe weitzman (not verified) on Tue, 2009-12-08 04:39.

@Bevan - fields in d7 already store old revisions separate from the current revision. We are way way more than half way there. And fields are quite widely used in cvore and I expect the same from contrib.

Submitted by Crell on Thu, 2009-12-10 06:58.

There was a lot of related discussion, although sadly nothing that got committed to Drupal 7, here: http://drupal.org/node/282122

The original subject was "draft" states for nodes, but that quickly turned into revising the entire node state and workflow logic. That's currently another Drupal fail that needs to be overhauled en masse, especially for a "never delete, just archive and purge" workflow to work.

For the record, though, I'm tentatively +1 on that approach.

Submitted by Gigie94 (not verified) on Mon, 2009-12-14 11:12.

I must say, I would love if we could do this in Drupal 8. As said confirmation forms, rarely prevent people from actually making mistakes - its only after the deed that one wishes to revert. A good framework for that could only really flourish if it comes from core.

Submitted by streek21 on Tue, 2010-01-19 20:01.

Your idea towards create & archieve is perfect,so we hope the new feature would be added in Drupal8.Thanks.
buy air purifiers

Submitted by Sony Book (not verified) on Fri, 2010-07-16 11:07.

An interesting article you refer to around relational databases which of course are still by far the most widely used databases. Meanwhile, object-relational database-management systems (ORDBMSs) have added object capabilities to relational databases. They are also totally ubiquitous in programming, whether it’s mainframes, application programming or even phones now a days everyone stores persistent data in a database. Relational databases are among the first that wanted to represent their data as XML. The storage of XML documents in relational databases means describing hierarchical, tree-type structures with relations. I can however understand their restrictive nature but they are far from being replaced - Bob Jenner from Sony Book Reader.

Submitted by chanel (not verified) on Thu, 2010-09-16 09:36.

The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

Submitted by Julie (not verified) on Fri, 2010-10-22 07:28.

All of us need lots of data storage space, these all are possible by using database system. Database have facilities to read, write, delete etc. operations. Drupal 8 is doing great job regarding this. Julie
Julie- Ayurvedic remedy for cervical spondylitis pro.

Submitted by Jack (not verified) on Fri, 2010-10-22 07:38.

Database helps to store data on the computer or system. All we need to store data weather doing any software related job or net related job. For keeping our data secure Drupal 8 is doing effortless task. Drupal 8 have some extra features than Drupal 7.
Jack- linen cabinet

Submitted by Andrew (not verified) on Fri, 2010-10-22 09:34.

Drupal always serves the database management system. Its good to know that there is some extra features added in Drupal 8 as compare to Drupal 7. There is a bright future of database. Drupal wants to set relation between Database and the entity.
Andrew Lodges with Hot Tubs specialist.

Submitted by Jew123 (not verified) on Fri, 2010-10-22 13:09.

Drupal always tried to maintained the database.Drupal helps in web designing.It maintains the database of its work done.It is very much effective and user friendly.Most of the user are trying to implement on the system.
Jew - Writes about shoulder workouts

Submitted by Jaled (not verified) on Sat, 2010-10-23 05:15.

Database is nothing but a application of a software where as teaches through many excellent usability books, confirm forms are wrong,they become habitual and are just a nuisance instead of protecting the from mistakes.blogs about seo training dvds

Submitted by Robe on Sat, 2010-10-23 06:12.

Deleting ,updating,Creating a database are maintained using Drupal 7 , but creating and archiving the Application Program Interface leads to problem.Good note about the storage that abundant memory is helpful for Drupal 8 , otherwise we have to wait for the next version of Drupal.
Robe - Writes about internet t1 los angeles.

Submitted by Anonymous (not verified) on Thu, 2010-10-28 08:30.

Im using drupal on my blog as well, and it simply does what it says!
colon cancer symptoms

Submitted by Anonymous on Thu, 2010-11-11 11:29.

The computer should just do what its operator says and make it possible to revert easily.If you really insist on storage scarcity then write a contribute that runs a cleanup cronjob that deletes old data from the archives.Drupal is a free software package that allows anyone to easily publish, manage and organize a wide variety of content on a website. Hundreds of thousands of people and organizations are using Drupal to power an endless variety of sites.Drupal is open source software maintained and developed by a community of hundreds of thousands of users and developers.
Peter - Writes about muscle building

Submitted by Anonymous on Wed, 2011-02-02 11:31.

this essay is very fantastic, i will tell to my husband about your opinion about your topic.
adinda
hopw you keep writing great essay

Submitted by Anonymous on Sat, 2011-02-05 03:30.

this essay is very fantastic, i will tell to my husband about your opinion about your topic.
adinda
hopw you keep writing great essay

Submitted by Anonymous on Mon, 2011-02-21 08:47.

yea I agree with you about drupal 8.

cheap essays