Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Create, read, update and delete

From Wikipedia, the free encyclopedia
(Redirected fromCRUD)
Basic operations of a computer database

Incomputer programming,create, read, update, and delete (CRUD) are the four basic operations (actions) ofpersistent storage.[1] CRUD is also sometimes used to describeuser interface conventions that facilitate viewing, searching, and changing information using computer-basedforms andreports.

History

[edit]

The termC.R.U.D was likely first popularized in 1983[2] byJames Martin in his bookManaging the data-base environment.

Conceptual

[edit]

Data can be put in alocation/area of a storage mechanism.

  • The fundamental feature of a storage location is that itscontent is bothreadable andupdatable.
  • Before a storage location can be read or updated it needs to becreated; that is allocated and initialized with content.
  • At some later point, the storage location may need to bedestructed; that is finalized and deallocated.

Together these four operations make up the basic operations of storage management known as CRUD:Create,Read,Update andDelete.

Use cases

[edit]

Databases

[edit]

The acronym CRUD refers to the major operations which are implemented bydatabases. Each letter in the acronym can be mapped to a standardStructured Query Language (SQL) statement.[3]

CRUDSQL
CreateINSERT
ReadSELECT
UpdateUPDATE
DeleteDELETE

Althoughrelational databases are a commonpersistence layer in software applications, numerous other persistence layers exist. CRUD functionality can for example be implemented withdocument databases,object databases,XML databases, text files, or binary files.

Somebig data systems do not implement UPDATE, but have only a timestamped INSERT (journaling), storing a completely new version of the object each time.

RESTful APIs

[edit]

The acronym CRUD also appears in the discussion ofRESTful APIs. Each letter in the acronym may be mapped to aHypertext Transfer Protocol (HTTP) method:

CRUDHTTP
CreatePOST, PUT if we don't have `id` or `uuid`
ReadGET
UpdatePUT to replace,PATCH to modify
DeleteDELETE

In HTTP, the GET (read), PUT (create and update), POST (create - if we don't have `id` or `uuid`), and DELETE (delete) methods are CRUD operations as they have storage management semantics, meaning that they letuser agents directly manipulate the states of targetresources.[4] ThePOST method, on the other hand, is a process operation that has target-resource-specific semantics which typically exceed the scope of CRUD operations.[5]

User interface

[edit]
This articlepossibly containsoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(November 2018) (Learn how and when to remove this message)

CRUD is also relevant at the user interface level of most applications. For example, in address book software, the basic storage unit is an individualcontact entry. As a bare minimum, the software must allow the user to:[6]

  • Create, or add new entries
  • Read, retrieve, search, or view existing entries
  • Update, or edit existing entries
  • Delete, deactivate, or remove existing entries

Because these operations are so fundamental, they are oftendocumented and described under one comprehensive heading such as "contact management" or "document management" in general.[citation needed]

Other variations

[edit]

Other variations of CRUD include:

  • ABCD (add, browse, change, delete)
  • CRUDL (create, read, update, delete, list)
  • BREAD (browse, read, edit, add, delete)[7]
  • DAVE (delete, add, view, edit)[8]
  • CRAP (create, replicate, append, process)[9]

See also

[edit]

References

[edit]
  1. ^Martin, James (1983).Managing the Data-base Environment. Englewood Cliffs, New Jersey: Prentice-Hall. p. 381.ISBN 0-135-50582-8.
  2. ^Martin, James (1983).Managing the data-base environment. Englewood Cliffs, New Jersey: Prentice-Hall. p. 381.ISBN 0135505828.
  3. ^Maryam Sulemani (7 April 2021)."CRUD operations explained: Create, read, update, delete". Retrieved14 December 2021.
  4. ^Fielding, Roy (June 2014)."Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content, Section 4".IETF. Internet Engineering Task Force (IETF).RFC 7231. Retrieved2018-02-14.
  5. ^Roy T. Fielding (2009-03-20)."It is okay to use POST". roy.gbiv.com. Retrieved2020-04-14.POST only becomes an issue when it is used in a situation for which some other method is ideally suited: e.g., retrieval of information that should be a representation of some resource (GET), complete replacement of a representation (PUT), or any of the other standardized methods that tell intermediaries something more valuable than "this may change something." The other methods are more valuable to intermediaries because they say something about how failures can be automatically handled and how intermediate caches can optimize their behavior. POST does not have those characteristics, but that doesn't mean we can live without it. POST serves many useful purposes in HTTP, including the general purpose of "this action isn't worth standardizing."
  6. ^Kann, Charles.Programming for the Web - From Soup to Nuts - Implementing a Complete GIS Web Page. Gettysburg College. pp. 6.1 CRUD Interface.
  7. ^Paul M. Jones (2008)."BREAD, not CRUD".
  8. ^McGaw, James (21 June 2010).Beginning Django E-Commerce. Apress. p. 41.ISBN 9781430225362.
  9. ^"CRAP and CRUD: From Database to Datacloud - Direct2DellEMC".Direct2DellEMC. 2012-11-13. Retrieved2018-01-30.
Types
Concepts
Objects
Components
Functions
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Create,_read,_update_and_delete&oldid=1274125591"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp