Switch to: V9V8V7V6V5

ValentinaDB Extensions

This article discusses file extensions of Valentina DB when you use it locally or under Valentina Server. Also, it explains changes we made in v7.5 for Valentina Server.

Short Story

VServer Mac Users Only.

If you in rush and upgrading from some version of VServer < v7.5 to some version >= v7.5 read this section for instructions.

  • DOWNLOAD Valentina Server v7.5 or newer and install it. After installation VServer is running.

Valentina Server 7.5 will automatically convert masterDB records, adding .vdb to databases if needed.

  • START Valentina Studio of the same version and connect to VServer. You will see your databases under VServer. If some of them have “x” on the icon then go to the next step, otherwise all right, done.

  • Go to VServer/databases folder
    • use preference panel “Valentina Servers” and click Location “SHOW” button
    • Finder CMD+G and type /Library/VServer_x64
  • ADD ”.vdb” extension to those databases marked by “x”.

  • SWITCH to Valentina Studio and click REFRESH button on the top left (if needed few times). Maybe click a database. You should see that icon is changed, so Valentina Server has recognized that DB.

Long Story

Valentina DB can keep database in 1, 2, 3 or 4 main files:

  • .vdb - schema description
  • .dat - records of tables, links, keyvalues
  • .blb - BLOB values
  • .ind - index files

Yet exists helper files which engine create and destroy self when it needs

  • .tmp - temporary data
  • .jourmal

Mac History

Historically Mac OS users were used to work with files without extensions. Valentina DB ADK allowed doing this providing mode - 1 file, and db.Create( “dbname” ), i.e. developer do not specify extension. But on Windows and Linux the same code will create a database with extension “dbname.vdb”.

VServer Mac History

Up to v7.5 Valentina Server did the same. It created a database without ”.vdb” extension.

Move Local VDB to VServer History

Valentina Developer can take a local database and move it into “databases” folder of Valentina Server even while it runs. Then register this database to VServer and start to use it.

  • While you are on Mac, the database has NO ”.vdb” extension and this is okay for VServer also.
  • While you are on Win/Linux, the database has ”.vdb” extension and this is okay for VServer also.

But if you move a database between OS, you may need to change the extension.

API vs SQL

Except API command VDatabase.CreateDatabase() exists SQL command CREATE DATABASE.

SQL Developers in this command usually do just CREATE DATABASE dbname, because usually, they work with a DBMS SQL Server. Notice that SQLite - local based db engine do not have such SQL command.

Changes in v7.5

To make things more consistent between

  1. OS
  2. local and server
  3. API and SQL

starting with v7.5 we have provided the following logic:

* You still have a way to get db_name without extension. Now this will work even on Windows and Linux.

* To get .vdb extension - you should specify it explicitly.

* Valentina Server is an application from Paradigma Software and now it takes care about own extensions. It uses .vdb always.

* In case you move local DB under VServer/databases, you should make sure that it has .vdb, otherwise VServer will not “see” that files.

Who Affected?

We think that these changes can affect:

1) Valentina Server MAC users - you MUST do steps described in SHORT STORY above.

2) Win/Linux ADK developers. Please check that your code specify .vdb explicitly: db.CreateDatabase( “db_name.vdb” )

Custom Extensions

ADVANCED

Valentina DB ADK allows you to specify custom extensions for 4 main files with help of Valentina.SetExtensions() method.

In this case, you should provide in the db.CreateDatabase() you own extension: db.CreateDatabase( “db_name.myvdb” ).

In case you will need to move such database under VServer/databases, you should change all your extensions to standard Valentina Server's.