MongoDB: sort(), skip(), and limit()
These three methods are commonly used with find() to sort records, skip records, and restrict the number of records returned. Assume we have a students collection: Example data: 1. sort()…
My Blog
These three methods are commonly used with find() to sort records, skip records, and restrict the number of records returned. Assume we have a students collection: Example data: 1. sort()…
In MongoDB, remove() is used to delete documents from a collection. Note: remove() is an older MongoDB method. In modern MongoDB, use deleteOne() or deleteMany(). 1. Remove One Document Suppose:…
Here are different MongoDB update() examples in English, explained simply. Note: In modern MongoDB, use updateOne() and updateMany() instead of the older update() method. 1. Update One Field Suppose we…
Below is a complete Employee (emp) practical example with data and common find() queries, including AND, OR, NOT, and NOR. 1. Create Database and Employee Collection Insert employee records: 2.…
Example: Add an employee’s details Suppose you have a WordPress Employee post type and want to add: With ACF, you can create these as custom fields instead of putting everything…
Msc_IT&CA_-1-2-2022 (1)-12-15Download
CREATE OR REPLACE TRIGGER trg_emp_insertAFTER INSERT ON empFOR EACH ROWBEGIN— Insert into audit tableINSERT INTO emp (emp_id, emp_name,salary)VALUES (:NEW.emp_name,:NEW.salary,:NEW.emp_id); — Display messageDBMS_OUTPUT.PUT_LINE(‘Employee inserted successfully.’); END; insert into emp(emp_name,salary,emp_id)values(‘rohan’,3000,3);select * from…
In Oracle, you create an index using the CREATE INDEX statement. Syntax Example 1: Create a Simple Index Suppose you have an employees table: This creates an index on the…
Database Administration in MongoDB means managing, maintaining, and optimizing MongoDB databases to ensure they are secure, fast, reliable, and always available.A MongoDB Database Administrator (DBA) performs tasks like installation, configuration,…
style.css clock { } index.html