The Initial Touch on Database and Look on Documented Database
We can take the database as a structured system for collecting, retrieving and displaying information. It includes records for each entry, and fields within each record to define information which may be useful for automating and simplifying many business functions.
Many databases are based on SQL, or Structured Query Language, which is a programming language used to create relational databases. The size and complexity of the database program you choose depends on your present and future needs.
In here there are so many things to consider when you are choosing a suitable database for your application, there are so many relational and NoSQL databases available for your application, first of all you have to determine what are the performances of your database that you need within your application after you create the application successfully, you have to select a database by fulfilling all those needs for your software and the parties who are using your application. Here I must mention that there is no use of using the technology you are familiar with rather than using the most appropriate one for your project.
When choosing a database different people have used to consider different criteria of aspects of databases in order to make their works more easier. Here we must consider the purchasing costs, the amount of storage that we're going to store on it, what are the network requirements and what are the available resources for our database because practicality is one of the most important things when we create an application.
when I take the things that we need to consider at select in the database together,
one of the main thing that we have to consider on this is operational and maintenance costs of the database:
- A reliable monitoring and alerting system
- Support for backup and restore
- Reasonable upgrade and migration costs
- An active support community
- Ease of performance tuning
- Ease of troubleshooting
As the next step we have to consider about Service stability of the database that we are going to use:(In here, it is better to consider about the persons and organizations we are going to use our application and our database for them)
- Support for multiple data replicas
- Highly available services
- Support for multiple writes and multi-active architecture
And also we need to have an idea about the performance and the uses and the implementers of our Software application may satisfy with those performance.
- Latency
- Queries per second (QPS)
- Whether it supports more advanced hierarchical storage features
we need to have an idea about some of the following things in order to make a good intimacy with our database regularly,
- Stable services
- Performance
- Scalability(, multiple users will need access to the database at the same time, so the database should support multiple users. Even if you start with a single user, plan for growth of your organization, and expect others to need access to data.)
- Ease of developing database interface
- Ease of modifying the database schema
There are 2 main types of databases:
• Relational Databases (SQL based).
• NoSQL Databases.
- X-axis, application scenarios
- Y-axis, database interfaces
Databases support OLTP workloads and the SQL language.
NoSQL databases - for optimizing special scenarios.
Relational Database
Simple structure, use SQL, (for data, normally in a program.),fast updating, All the DB is saved on one machine, and relations between records are used as pointers,(update a record once and all its related records will update immediately.),supports automatic transactions As the disadvantages of relational DB, we can see, query execution time can be increased with the size of the table, doesn’t support OOP based objects.
Document Database
Keep objects with different structures, can represent almost all the data structures including OOP based objects, lists, and dictionaries using good old JSON. Unschematized by nature, it often supports schema validation, meaning you can make a collection schematized, the schema won’t be as simple as a table, it will be a JSON schema with specific fields.
- cache — key-value DB.
- graph-like data — graph DB.
- If you tend to query on subsets of columns /features — use column DB.
- For all other use cases — Relational or Document DB.
I am going to focus on the NoSQL database from this article. There also we have multiple choices, let’s see how to select the correct NoSQL database for our developing application.
When we choose a NoSQL database, there are also some points to consider, such as to use the primary-secondary framework, client shading, distributed cluster, Couchbase, or HiKV.
Efficiently choosing a NoSQL database
While in relational DBs everything is structured to rows and columns, in NoSQL DBs there is no common structured schema for all records like relational databases are maintaining rows and columns for storing data.Unit of this DB - document.
Document is a JSON.
Schema can vary between different documents and contain different fields.
Allow indexing of some fields in doc - allow faster queries based on those fields (*this forces all the documents to have the field if you use this feature).
Also supporting parallel computations.
Mainly used for -
- Data analysis - Cause different records are not dependent on one another.
- big data analytics
Common document-based databases: MongoDB, CouchDB, DocumentDB.
NoSQL database Selection
NoSQL DBs
1. Document-oriented DBs
Document-Oriented |
2. Columnar DBs
Column DB |
Key Value DB |
Graph DB Example |
MongoDB
Today we are focusing on some initial steps to create simple data operations with MongoDB and what it is.
MongoDB is a document database designed for ease of development and scaling. The Manual introduces key concepts in MongoDB, presents the query language, and provides operational and administrative considerations and procedures as well as a comprehensive reference section.(MongoDB- official Doc.)
MongoDB offers -
- Community , (Free Source)
- Enterprise( part of the MongoDB Enterprise Advanced subscription and includes comprehensive support for MongoDB deployment.) versions DB, features - LDAP and Kerberos support, on-disk encryption, and auditing
- A record in MongoDB - document (which is a data structure composed of field and value pairs.)
- MongoDB documents are similar to JSON objects.
- The values of fields - arrays, and arrays of documents.
The advantages of using documents are :-(from, MongoDB- official Doc.)
- Documents (i.e. objects) correspond to native data types in many programming languages.
- Embedded documents and arrays reduce the need for expensive joins.
- Dynamic schema supports fluent polymorphism.
Let’s see how to include some records to the database at mongo DB,
- View The Initial Creation of Database of MongoDB (Inserting record and Finding some tuple at the creating table at mongo DB )
- View the Simple Search and initial operations of MongoDB(Finding some record from created table or database at mongo DB )
(Please Use Request Form if some issue occurred with accessing the Git Account Repository)
(*Scalability: Whether it's easy to scale horizontally and vertically)
(*Security: Whether it meets audit requirements and prevents SQL)
Comments
Post a Comment