How to Delete DDOs
DDOs provide coordinated database services to all data-entry objects (DEOs) connected to their Data Dictionary structures. This means that a save, delete, find, or clear operation in a DDO will affect all DEOs connected to the Data Dictionary structure.
If you want to remove a DDO from your environment, you can do so by sending Request_Delete.
Delete a DDO
DDOs can be deleted by sending a request_delete message. This message is responsible for deleting a record from the DDO’s main table, updating all parent DDOs (and tables), and possibly deleting all child records as well.
The Cascade_Delete_State property controls this message. If it’s true, a delete will recurse up the Data Dictionary structure to delete all child records in every DDO that relates to the main table. If it’s false, a delete won’t recurse up the Data Dictionary structure but will delete all child records in only one DDO.
This is because a DDO has two representations: the one in memory and a persistent copy in the content server. The destructor deletes the object, all internal metadata structures, all content in memory, and all DDO data items and structures owned by the DDO.
It is also worth noting that this function does a few other things, such as perform an iteration of the DDO structure and update some internal metadata structures. You can use this function for performance reasons, especially if you are storing large amounts of data in a DDO.
Despite this, the best way to delete a DDO is by using the destructor. This is the quickest and safest way to do it, and also ensures that only the DDO in memory will be removed from the content server.
You may also want to consider a character undelete service. However, you should read the Character Undelete Service Policy and the DDO Code of Conduct before you decide to use it. SSG reserves the right to deny a Character Undelete Service request in its sole and absolute discretion. This includes, but is not limited to, situations where the requested character cannot be saved or deleted in-game or if the service request contains any error in its form.
Delete a Table
When you delete a table, all the records that contain data from that table are removed. This can be an effective way to clean up your database without having to restore from a backup file or to update data on another related table.
When deleting a table, you can use the DROP TABLE command in PhpMyAdmin or you can create a query and send it to the DDOs that have the table information. If you use the DROP TABLE command, make sure you have access to the database before executing the statement. If you don’t, your script could get stuck and cause your system to crash.
To delete a table, you must create a query that contains the fields from the table and uses criteria to return only the records that you want to remove. You must also enable a set of rules called Referential Integrity, and you must enable cascading deletes.
Enabling referential integrity ensures that all of the foreign keys in the table you delete are properly set up to match the primary key columns in their related tables. You can disable this property if you don’t need it, but it makes the process of deleting data from a related table much faster.
You can also enable cascading deletes, which allows you to delete records on the “one” side of a relationship and then delete all the related records on the “many” side of the same relationship. To enable this feature, you must first edit the relationship in Relationships pane and make sure that the Enforce Referential Integrity check box is selected.
You can also delete individual field values from a table by using an update query. This is a more efficient and effective way to remove data from a table than by using a delete query. When you run an update query, the existing values are updated to either a null value (that is, no data) or a zero-length string (a pair of double quotation marks with no space in between).
Delete a Record
If you have records that you no longer need, they can be deleted from your Apricot database. These records can be backed up to another file, but they will not appear in search results or reports.
Deleting a record is easy, and you can delete multiple records at once. You can also delete only a partial amount of information from the record – such as a few cells or an entire field (column).
To delete a record, you must use a DELETE statement and select the records that you want to remove. You can also use a search to find the records that you want to delete.
You can search for a record using the search argument, search-arg, which can be an integer literal or a numeric field with zero decimal positions. It can also be a composite key in the form of a KLIST name, a list of values, or %KDS.
The search argument can also be a file or update file name, which must be an externally described file or the file format of an update file. The file must be a delete-capable file (identified by specifying *UPDATE or *DELETE in the USAGE keyword of a free-form definition, or by a U in position 17 of a fixed-form file description specification).
If you want to delete a record from a table, you must use a DELETE command on the underlying table, and select all the records that you want to remove from the table. You can also delete a record from a sub-table by selecting all the records that are part of the underlying table and then performing a DELETE operation on them.
In this example, the table contains a Short Text and Long Text (Memo) field, and we want to delete a record that is part of the Memo field. To delete this record, we will select all the records that are part of the Short Text field and then perform a DELETE operation on them.
We can also delete this record from a sub-table by selecting the records that are part of the Memo field and then performing a DELETE operation. We can also delete this record from a table by selecting all the records that are part of a Memo field and then performing a DELETE transaction on them.