0% found this document useful (0 votes)
12 views6 pages

List Out The Basic Features of MongoDB

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 6

List out the basic features of MongoDB

1. Document-Oriented Storage: MongoDB stores data in JSON-like documents,


making it flexible and easy to work with different types of data.

2. Schema-less: MongoDB is schema-less, meaning you don't need to define a schema


before inserting data. Each document can have its own unique structure.

3. Scalability: MongoDB supports horizontal scaling through sharding, allowing it to


handle large amounts of data by distributing it across multiple servers.

4. Indexing: MongoDB supports various types of indexes to improve query


performance, including single field, compound, geospatial, text, and hashed indexes.

5. Aggregation Framework: MongoDB provides a powerful aggregation framework for


data processing and transformation, enabling complex queries and data analysis.

6. Replication: MongoDB supports replication with replica sets, providing high


availability and data redundancy by maintaining multiple copies of data on different
servers.

7. GridFS: MongoDB includes GridFS for storing and retrieving large files such as
images, videos, and other binary data.

8. Ad Hoc Queries: MongoDB allows for dynamic querying, enabling you to search by
field, range, and even regular expressions.

9. Transactions: MongoDB supports multi-document ACID transactions, ensuring data


integrity and consistency across multiple documents and collections.

10. Flexible Deployment: MongoDB can be deployed on-premises, in the cloud, or in a


hybrid environment, offering flexibility to suit various infrastructure needs.

11. High Performance: MongoDB is designed for high performance with its support for
indexing, in-memory storage engine, and efficient data retrieval.

12. Community and Enterprise Editions: MongoDB is available in both a free, open-
source community edition and a commercial enterprise edition with additional
features and support.

K
Advantages of JavaScript
• Saves time and bandwidth: Regardless of where you host
JavaScript, it always gets executed on the client environment to
save lots of bandwidth and make the execution process fast.
• Easily send HTTP requests: In JavaScript, XMLHttpRequest is
an important object that was designed by Microsoft. The object
calls made by XMLHttpRequest as an asynchronous HTTP
request to the server to transfer the data to both sides without
reloading the page
• Compatible for all browsers: The biggest advantage of
JavaScript having the ability to support all modern browsers and
produce an equivalent result.
• Community Support: Global companies support community
development by creating important projects. An example is
Google (created the Angular framework) or Facebook (created
the React.js framework).
• Vastly used: JavaScript is employed everywhere on the web.
• Environment Support: JavaScript plays nicely with other
languages and may be utilized in an enormous sort of
application.
• Open source: Many open-source projects provide useful help for
developers to add JavaScript.
• Programming language: There are many available courses
within the field of JavaScript, because of which you’ll quickly
and simply expand your knowledge of this programming
language.
• Easy to use: It is not difficult to start working in JavaScript. For
this reason, many of us prefer to start our adventure in the IT
sector by learning this language. It gives the power to make rich
interfaces.
• Backend usage: There are some ways to use JavaScript through
Node.js servers. It is possible to develop a whole JavaScript app
from front to back using only JavaScript.
K

Kk
Define Directive in Angular JS.
In AngularJS, a directive is a powerful feature that allows you to extend the
functionality of HTML. Directives are special markers on DOM elements (such as
attributes, elements, comments, or CSS classes) that tell AngularJS to attach a
specified behavior to that DOM element or even transform the DOM element and its
children.

Key Points About Directives:

1. Custom HTML Elements: Directives can be used to create custom HTML


elements and attributes that make your markup more expressive and
readable.

2. Behavioral Extension: They allow you to extend the behavior of existing


DOM elements in a declarative way.

3. Reusable Components: Directives help in building reusable components that


can be easily integrated into different parts of your application.

Types of Directives:

1. Attribute Directives: Change the behavior or appearance of an existing DOM


element. Example: ngModel, ngClass, ngStyle.

2. Element Directives: Define new DOM elements and the behavior associated
with them. Example: ngMessages, custom directives.

3. Class Directives: Change the behavior or appearance of an element based on


class name. Example: ngAnimate.

4. Comment Directives: Rarely used, but you can define behavior based on
comments within the HTML. Example: ngRepeat.

K
K
Type of css
• CSS stands for Cascading Style Sheets

• CSS describes how HTML elements are to be displayed on screen, paper,


or in other media

• CSS saves a lot of work. It can control the layout of multiple web pages all
at once
1. External CSS

• With an external style sheet, you can change the look of an entire
website by changing just one file!

• Each HTML page must include a reference to the external style sheet file
inside the <link> element, inside the head section.

body { background-color: lightblue;

h1 {

color: navy;

margin-left: 20px; }

<html>

<head>

<link rel="stylesheet" href="mystyle.css">

</head>

<body>

<h1>This is a heading</h1>

<p>This is a paragraph.</p>

</body>

</html>
2. Internal CSS
An internal style sheet may be used if one single HTML page has a unique
style. The internal style is defined inside the <style> element, inside the
head section.
<html>
<head>
<style>
h1 {
color: maroon;
}
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
</body> </html>
Inline CSS

An inline style may be used to apply a unique style for a single


element.

To use inline styles, add the style attribute to the relevant


element. The style attribute can contain any CSS property.

Example

Inline styles are defined within the "style" attribute of the


relevant element:
<!DOCTYPE html>
<html>
<body>

<h1 style="color:blue;text-align:center;">This is a
heading</h1>
<p style="color:red;">This is a paragraph.</p>

</body>
</html>
Write a Node JS code to print a list of files present in the current directory

You can use the Node.js fs (File System) module to achieve this. Here's a simple
example:

const fs = require('fs');

// Function to list files in current directory fs.readdir(__dirname, (err, files) => { if (err) {
console.error('Error reading directory:', err); return; } console.log('Files in current directory:');
files.forEach(file => { console.log(file); }); });

Save this code in a file (e.g., listFiles.js) and run it using Node.js. It will list all the
files in the current directory

You might also like