Which of the following allows users to add, change, delete, or retrieve data in a database?

CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete. Persistent storage refers to any data storage device that retains power after the device is powered off, such as a hard disk or a solid-state drive. In contrast, random access memory and internal caching are two examples of volatile memory - they contain data that will be erased when they lose power.

Key takeaways

  • The CRUD acronym identifies all of the major functions that are inherent to relational databases and the applications used to manage them, which include Oracle Database, Microsoft SQL Server, MySQL, and others.
  • The four CRUD functions can perform different types of operations on selected data within the database.
  • CRUD operations are widely used in many applications that are supported by underlying relational databases.
  • Sumo Logic's log aggregation capabilities can be used to monitor the total volume of CRUD commands over time, correlate the results with other important metrics, and help identify and rectify the causes of poor performance.

Organizations that keep track of customer data, accounts, payment information, health data, and other records require data storage hardware and applications that provide persistent storage. This data is typically organized into a database, which is simply an organized collection of data that may be viewed electronically. There are many types of databases: hierarchical databases, graph databases, and object-oriented databases to name a few. The most commonly implemented type of database is a relational database, which consists of data tabled in rows and columns and connected to other tables with complementary information by a system of keywords that includes primary keys and foreign keys.

The CRUD acronym identifies all of the major functions that are inherent to relational databases and the applications used to manage them, which include Oracle Database, Microsoft SQL Server, MySQL, and others.

A relational database consists of tables with rows and columns. In a relational database, each row of a table is known as a tuple or a record. Each column of the table represents a specific attribute or field. The four CRUD functions can be called by users to perform different types of operations on selected data within the database. This could be accomplished using code or through a graphical user interface. Let's review each of the four components in-depth to fully appreciate their collective importance in facilitating database interactions.

Create

The create function allows users to create a new record in the database. In the SQL relational database application, the Create function is called INSERT. In Oracle HCM Cloud, it is called create. Remember that a record is a row and that columns are termed attributes. A user can create a new row and populate it with data that corresponds to each attribute, but only an administrator might be able to add new attributes to the table itself.

Read

The read function is similar to a search function. It allows users to search and retrieve specific records in the table and read their values. Users may be able to find desired records using keywords, or by filtering the data based on customized criteria. For example, a database of cars might enable users to type in "1996 Toyota Corolla," or it might provide options to filter search results by make, model and year.

Update

The update function is used to modify existing records that exist in the database. To fully change a record, users may have to modify information in multiple fields. For example, a restaurant that stores recipes for menu items in a database might have a table whose attributes are "dish," "cooking time," "cost" and "price." One day, the chef decides to replace an ingredient in the dish with something different. As a result, the existing record in the database must be changed and all of the attribute values changed to reflect the characteristics of the new dish. In both SQL and Oracle HCM cloud, the update function is simply called "Update."

Delete

The delete function allows users to remove records from a database that is no longer needed. Both SQL and Oracle HCM Cloud have a delete function that allows users to delete one or more records from the database. Some relational database applications may permit users to perform either a hard delete or a soft delete. A hard delete permanently removes records from the database, while a soft delete might simply update the status of a row to indicate that it has been deleted while leaving the data present and intact.

CRUD operations are widely used in many applications that are supported by underlying relational databases. These four basic CRUD functions are incredibly versatile in how they can support a variety of important functions across different business models and industry verticals. Let's look at an example of how CRUD is implemented.

An enterprise organization maintains a human resources department that helps manage to staff and keep track of existing employees. The HR department manages a relational database application with various tables that track different types of employee information:

  • An Employees Table includes attributes such as first and last name, employee identification number, contact number, home address, work location, and any other relevant personal details.
  • An HR Data Table that includes the employee's payroll information, social security number, employee ID and salary.
  • A Locations Table that contains attribute data for each of the company's physical locations, including building ID, address, zip code, the name of the manager, etc.

When a new employee is hired, someone new is added to the payroll, or the company acquires a new location, the HR department creates a record to reflect the changes. If the business needs to send a letter to one or more employees, the read function might be used to find the correct mailing address for the employee. If an employee's salary or contact information changes, the HR department may need to update the existing record to reflect the change.

If an employee leaves the company, the company may choose to perform a soft or hard delete of their information in the database. Here, a soft delete might be appropriate as the organization wishes to retain data on the individual without cluttering up future searches or filtered results.

CRUD testing is a black-box testing technique to validate the functionality of a software product. This term for database testing is applicable for SQL and other databases and ensures proper data mapping, data integrity, maintaining of ACID properties, and accuracy of business rules.

The above example is just one way that CRUD functions enable organizations to achieve their business objectives. CRUD operations are also used to manage forums, eCommerce stores, social media websites and many, many other types of applications that are supported by a relational database.

IT organizations that deploy databases into the cloud gain important capabilities with Sumo Logic that make it easier to monitor the overall health of the deployment, check slow server status, and rapidly identify errors, slow execution times and stopped servers.

Sumo Logic's log aggregation capabilities can be used to monitor the total volume of CRUD commands over time, correlate the results with other important metrics, and help identify and rectify the causes of poor performance.

Reduce downtime and move from reactive to proactive monitoring.

Which of the following allows users to add, change, delete, or retrieve data in a database?

What is a Relational Database?

Which of the following allows users to add, change, delete, or retrieve data in a database?

Get started with Amazon Relational Database Service

Amazon RDS

Amazon Aurora

AWS Database Migration Service

Database Blog

A relational database is a collection of data items with pre-defined relationships between them. These items are organized as a set of tables with columns and rows. Tables are used to hold information about the objects to be represented in the database. Each column in a table holds a certain kind of data and a field stores the actual value of an attribute. The rows in the table represent a collection of related values of one object or entity. Each row in a table could be marked with a unique identifier called a primary key, and rows among multiple tables can be made related using foreign keys. This data can be accessed in many different ways without reorganizing the database tables themselves.

Which of the following allows users to add, change, delete, or retrieve data in a database?

6:44

Understanding Amazon Relational Database Service (RDS)

Important Aspects of Relational Databases

Which of the following allows users to add, change, delete, or retrieve data in a database?

SQL

SQL or Structured Query Language is the primary interface used to communicate with Relational Databases. SQL became a standard of the American National Standards Institute (ANSI) in 1986. The standard ANSI SQL is supported by all popular relational database engines, and some of these engines also have extension to ANSI SQL to support functionality which is specific to that engine. SQL is used to add, update or delete rows of data, retrieving subsets of data for transaction processing and analytics applications, and to manage all aspects of the database.

Data Integrity

Data integrity is the overall completeness, accuracy and consistency of data. Relational databases use a set of constraints to enforce data integrity in the database. These include primary Keys, Foreign Keys, ‘Not NULL’ constraint, ‘Unique’ constraint, ‘Default’ constraint and ‘Check’ constraints. These integrity constraints help enforce business rules on data in the tables to ensure the accuracy and reliability of the data. In addition to these, most relation databases also allow custom code to be embedded in triggers that execute based on an action on the database.

Transactions

A database transaction is one or more SQL statements that are executed as a sequence of operations that form a single logical unit of work. Transactions provide an "all-or-nothing" proposition, meaning that the entire transaction must complete as a single unit and be written to the database or none of the individual components of the transaction should go through. In the relation database terminology, a transaction results in a COMMIT or a ROLLBACK. Each transaction is treated in a coherent and reliable way independent of other transactions.

ACID Compliance

All database transactions must be ACID compliant or be Atomic, Consistent, Isolated and Durable to ensure data integrity.

Atomicity requires that either transaction as a whole be successfully executed or if a part of the transaction fails, then the entire transaction be invalidated. Consistency mandates the data written to the database as part of the transaction must adhere to all defined rules, and restrictions including constraints, cascades, and triggers. Isolation is critical to achieving concurrency control and makes sure each transaction is independent unto itself. Durability requires that all of the changes made to the database be permanent once a transaction is successfully completed.

Relational Database Engines on Amazon RDS

Which of the following allows users to add, change, delete, or retrieve data in a database?

Amazon Aurora

Amazon Aurora is a MySQL and PostgreSQL-compatible relational database engine that combines the speed and availability of high-end commercial databases with the simplicity and cost-effectiveness of open source databases. Amazon Aurora provides up to five times better performance than MySQL with the security, availability, and reliability of a commercial database at one-tenth the cost.Learn more »

Oracle

Amazon RDS allows you to deploy multiple editions of Oracle Database in minutes with cost-efficient and re-sizable hardware capacity. You can bring existing Oracle licenses or pay for license usage by the hour. RDS frees you up to focus on application development by managing complex database administration tasks including provisioning, backups, patching, monitoring, and hardware scaling.Learn more »

Microsoft SQL Server

Amazon RDS for SQL Server makes it easy to set up, operate, and scale SQL Server in the cloud. You can deploy multiple editions of SQL Server including Express, Web, Standard and Enterprise. Since Amazon RDS for SQL Server provides you direct access to the native capabilities of the SQL Server, your applications and tools should work without any changes.Learn more »

MySQL

MySQL is an open-source relational database management system (RDBMS) used by a very large number of web-based applications.Amazon RDS for MySQL gives you access to the capabilities of a familiar MySQL database engine. This means that the code, applications, and tools you already use today with your existing databases can be used with Amazon RDS without any changes. Learn more »

PostgreSQL

PostgreSQL is a powerful, enterprise class open source object-relational database system with an emphasis on extensibility and standards-compliance. PostgreSQL boasts many sophisticated features and runs stored procedures in more than a dozen programming languages, including Java, Perl, Python, Ruby, Tcl, C/C++, and its own PL/pgSQL, which is similar to Oracle's PL/SQL. Learn more »

MariaDB

MariaDB is a MySQL-compatible database engine which is a fork of MySQL, and is being developed by the original developers of MySQL. Amazon RDS makes it easy to set up, operate, and scale MariaDB deployments in the cloud. With Amazon RDS, you can deploy scalable MariaDB databases in minutes with cost-efficient and resizable hardware capacity.Learn more »

Start Using Amazon Relational Database Service

It's easy to get started with Amazon RDS. Follow our Getting Started Guide to create your first Amazon RDS instance in a few clicks.

Get Started for Free

GET STARTED WITH AWS

Learn how to start using AWS in minutes

Which of the following allows users to add, change, delete, or retrieve data in a database?

AWS FREE TIER

Gain free, hands-on experience with AWS for 12 months

Which of the following allows users to add, change, delete, or retrieve data in a database?