(858) 586 7777 | About | Testimonials | Contact
vteams vteams vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
Blog
  1. vteams
  2. Blog
  3. MariaDB: Solution for Merging MySQL and NoSQL Databases
Jan 14
vteams- blog

MariaDB: Solution for Merging MySQL and NoSQL Databases

  • January 14, 2016

vteam #550 was formed to migrate the version of client’s application from Cake 1 to Cake 3. The application was connected with 2 databases; MySQL and MongoDB. These databases were required to be merged in a single database. After application’s analysis, it was found that all the data was stored in MySQL database except the logs data – stored in MongoDB because of NoSQL.

To merge them in a single database, a data storage consisted of both SQL and NoSQL was needed.

Proposed Solution:

A solution of MariaDB was proposed by vteam #550. Reason being all MySQL features existed in MariaDB. Also, the following features of NoSQL were supported that helped vteams engineer Mahmood Ali to migrate the logs data from MongoDB to MariaDB:

  • Dynamic Columns
  • Load_file
  • Connect Storage Engine
    .
Dynamic Columns:

These columns allowed the storage of different sets of columns for each row in a table. A set of columns was stored in a blob having a small set of functions to manipulate. Following were some functions provided by MariaDB for the operations on dynamic columns/blob data:

1- COLUMN_CREATE:
It is used to create a dynamic column that stores specified columns with values.

1
COLUMN_CREATE(column_nr, value [as type], [column_nr, value [as type]]...);

2- COLUMN_ADD:
It is used to add/update dynamic blob columns.

1
COLUMN_ADD(dyncol_blob, column_nr, value [as type], [column_nr, value [as type]]...);

3- COLUMN_GET:
It is used to get the value of a dynamic column by its name. If no column exists with the given name, NULL will be returned.

1
COLUMN_GET(dyncol_blob, column_nr as type);

4- COLUMN_CHECK:
Check if dyncol_blob is a valid packed dynamic columns blob or not. Return value – 1 means the blob is valid, Return value – 0 means not a valid blob.

5- COLUMN_DELETE:
Delete a dynamic column with the specified name. Multiple names can be given.

1
COLUMN_DELETE(dyncol_blob, column_name, column_name...);

6- COLUMN_EXISTS:
Check if a column with name column_name exists in dyncol_blob. If yes, it will return value – 1, otherwise return value will be 0.

7- COLUMN_LIST:
It is used to get a list of columns.

1
COLUMN_LIST(dyncol_blob);

8- COLUMN_JSON:
Return a JSON representation of data in dyncol_blob.

Load_File:

It would read the file and return file contents as a String. To use this function, file should be located on the host server.

1
UPDATE t SET blob_col=LOAD_FILE('/tmp/picture') WHERE id=1;

Connect Storage Engine:

It would enable MariaDB to access external, local or remote data. This was done by defining tables based on different data types (particular files in various formats), data extracted from other DBMS or products (such as Excel) via ODBC, or data retrieved from the environment (for example DIR, WMI, and MAC tables).

  • Facebook
  • Twitter
  • Tumblr
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

Comments are closed.

SEARCH BLOG

Categories

  • Blog (490)
  • Captain's Log (1)
  • Closure Reports (45)
  • Experiments (7)
  • How-To (56)
  • Implementation Notes (148)
  • Learn More (156)
  • LMS (8)
  • Look Inside (10)
  • Operations Log (12)
  • Programmer Notes (20)
  • R&D (14)
  • Rescue Log (4)
  • Testimonials (25)
  • Uncategorized (4)

RECENT STORIES

  • GitHub Actions- Automate your software workflows with excellence
  • Yii Framework – Accomplish Repetitive & Iterative Projects with Ease
  • A Recipe for CRM Software Development
  • Are Agile and DevOps the same?
  • The Data Scientist’s Toolset

ARCHIVES

In Short

With the vteams model, you bypass the middleman and hire your own offshore engineers - they work exclusively for you. You pay a reasonable monthly wage and get the job done without hassles, re-negotiations, feature counts or budget overruns.

Goals for 2020

  • Open development center in Australia
  • Complete and Launch the Robot
  • Structural changes to better address Clients' needs

Contact Us

Address: NEXTWERK INC.
6790 Embarcadero Ln, Ste 100,
Carlsbad, CA 92011, USA

Tel: (858) 586 7777
Email: fahad@nextwerk.com
Web: www.vteams.com

© 2020 vteams. All Rights Reserved.

Content Protection by DMCA.com