Design databases

Link uses a master database and a resource database to store some of its design data.

The name of the master database was provided during Link installation by the value of the appropriate configuration property. For Windows installations, the property is HIP_MONGO_MASTER_DB in hip-server-env.bat. During a Windows installation, the value of this property is usually provided through the installation wizard. For Linux installations, the property is the "masterDb" key of the object value of the mongo top-level key (mongo.masterDb) of config.yaml. The default value for this configuration property in a stand-alone Link installation is mdb. Other names may be used in different contexts.

A Link installation is associated with a default account. The default account is named Default. This name is present as the value of the name property of an account object in the accounts collection of the master database. The default account is associated with an account ID. This account ID is the value of the _id property of the account object in the collection.

A single resource database is created during default installation. The resource database is named using the pattern _"rdb_<account ID>"_ The master database and the resource database which is associated with the default account store Link project information and related resources.

An example MongoDB shell session is given below, which shows how the default account ID can be determined. The name of the master database is assumed to be "mdb"

  • use mdb
  • db.accounts.find({“name”: “Default”})
    • A query result such as the following should be returned
      • [ { _id: '61532e49396b627364f9953e', name: 'Default' } ]
        • 61532e49396b627364f9953e is the ID of the default account in this example.
        • A resource database named rdb_61532e49396b627364f9953e would be present in this example