Make one MCQ for each sufficiently-important topic of the following text.:
Creating an OrbitDB instance
createInstance(ipfs, [options])
const orbitdb = await OrbitDB.createInstance(ipfs)
Creates and returns an instance of OrbitDB. Use the optional options argument for further configuration. It is an object with any of these properties:

directory (string): path to be used for the database files. By default it uses './orbitdb'.

peerId (string): By default it uses the base58 string of the ipfs peer id.

keystore (Keystore Instance) : By default creates an instance of Keystore. A custom keystore instance can be used, see this for an example.

cache (Cache Instance) : By default creates an instance of Cache. A custom cache instance can also be used.

identity (Identity Instance): By default it creates an instance of Identity

offline (boolean): Start the OrbitDB instance in offline mode. Databases are not be replicated when the instance is started in offline mode. If the OrbitDB instance was started offline mode and you want to start replicating databases, the OrbitDB instance needs to be re-created. Default: false.

After creating an OrbitDB instance, you can access the different data stores. Creating a database instance, eg. with orbitdb.keyvalue(...), returns a Promise that resolves to a database instance. See the Store section for details of common methods and properties.

For further details, see usage for kvstore, eventlog, feed, docstore and counter.

const db = await orbitdb.keyvalue('profile')
Public Instance Methods
Before starting, you should know that OrbitDB has different types of databases. Each one satisfies a different purpose. The databases that you can create are:

log: an immutable (write only) log database. Useful for transactions lists.
feed: a mutable log database. Useful for blog comments.
keyvalue: Useful for loading data from keywords or an id.
docs: a JSON documents database. Useful for user data or other structured data.
counter: Useful for ordered data (like an ordered list or a playlist.)
orbitdb.create(name, type, [options])
Creates and opens an OrbitDB database.

Returns a Promise that resolves to a database instance. name (string) should be the database name, not an OrbitDB address (i.e. user.posts). type is a supported database type (i.e. eventlog or an added custom type). options is an object with any of the following properties:

accessController (object): An object, as shown in the example below, containing the key write whose value is an array of hex encoded public keys which are used to set write access to the database. ["*"] can be passed in to give write access to everyone. See the GETTING STARTED guide for more info. (Default: uses the OrbitDB identity id orbitdb.identity.id, which would give write access only to yourself)

overwrite (boolean): Overwrite an existing database (Default: false)

replicate (boolean): Replicate the database with peers, requires IPFS PubSub. (Default: true)

meta (object): An optional object in database manifest. Immutably stores any JSON-serializable value. Readable via db.options.meta. Default: undefined.

const db = await orbitdb.create('user.posts', 'eventlog', {
    accessController: {
      write: [
        // Give access to ourselves
        orbitdb.identity.id,
        // Give access to the second peer
        '042c07044e7ea51a489c02854db5e09f0191690dc59db0afd95328c9db614a2976e088cab7c86d7e48183191258fc59dc699653508ce25bf0369d67f33d5d77839'
      ]
    },
    overwrite: true,
    replicate: false,
    meta: { hello: 'meta hello' }
})
// db created & opened
orbitdb.determineAddress(name, type, [options])
Returns the orbit-db address for given parameters

Returns a Promise that resolves to an orbit-db address. The parameters correspond exactly with the parameters of orbit-db.create. This is useful for determining a database address ahead of time, or deriving another peer's address from their public key and the database name and type. No database is actually created.

const dbAddress = await orbitdb.determineAddress('user.posts', 'eventlog', {
  accessController: {
    write: [
    // This could be someone else's public key
    '042c07044e7ea51a489c02854db5e09f0191690dc59db0afd95328c9db614a2976e088cab7c86d7e48183191258fc59dc699653508ce25bf0369d67f33d5d77839'
  ]}
})
orbitdb.open(address, [options])
Opens an OrbitDB database.

Returns a Promise that resolves to a database instance. address (string) should be a valid OrbitDB address. If a database name is provided instead, it will check options.create to determine if it should create the database. options is an object with any of the following properties:

localOnly (boolean): If set to true, will throw an error if the database can't be found locally. (Default: false)
create (boolean): Whether or not to create the database if a valid OrbitDB address is not provided. (Default: false)
type (string): A supported database type (i.e. eventlog or an added custom type). Required if create is set to true. Otherwise it's used to validate the manifest.
overwrite (boolean): Overwrite an existing database (Default: false)
replicate (boolean): Replicate the database with peers, requires IPFS PubSub. (Default: true)
const db = await orbitdb.open('/orbitdb/Qmd8TmZrWASypEp4Er9tgWP4kCNQnW4ncSnvjvyHQ3EVSU/first-database')
Convenience methods are available when opening/creating any of the default OrbitDB database types: feed, docs, log, keyvalue, counter

You can use: orbitdb.feed(address, options)

Instead of: orbitdb.open(address, { type: 'feed', ...options })

orbitdb.disconnect()
Close databases, connections, pubsub and reset orbitdb state.

Returns a Promise that resolves once complete.

await orbitdb.disconnect()
orbitdb.stop()
Alias for orbitdb.disconnect()

await orbitdb.stop()
orbitdb.keyvalue(name|address)
Creates and opens a keyvalue database

Returns a Promise that resolves to a KeyValueStore instance.

const db = await orbitdb.keyvalue('application.settings')
// Or:
const db = await orbitdb.keyvalue(anotherkvdb.address)
Module: orbit-db-kvstore

See the Store section for details of common methods and properties.

put(key, value)
Returns a Promise that resolves to a String that is the multihash of the entry.

await db.put('hello', { name: 'World' })
set(key, value)
Alias for .put()

await db.set('hello', { name: 'Friend' })
get(key)
Returns an Object with the contents of the entry.

const value = db.get('hello')
// { name: 'Friend' }
del(key)
Deletes the Object associated with key. Returns a Promise that resolves to a String that is the multihash of the deleted entry.

const hash = await db.del('hello')
// QmbYHhnXEdmdfUDzZKeEg7HyG2f8veaF2wBrYFcSHJ3mvd
all
Returns an Object with the contents of all entries in the index.

const value = db.all
// { hello: { name: 'Friend' } }
orbitdb.kvstore(name|address)
Alias for orbitdb.keyvalue()

orbitdb.log(name|address)
Creates and opens an eventlog database

Returns a Promise that resolves to a EventStore instance.

const db = await orbitdb.eventlog('site.visitors')
// Or:
const db = await orbitdb.eventlog(anotherlogdb.address)
Module: orbit-db-eventstore

See the Store section for details of common methods and properties.

add(event)
Returns a Promise that resolves to the multihash of the entry as a String.

const hash = await db.add({ name: 'User1' })
get(hash)
Returns an Object with the contents of the entry.

const event = db.get(hash)
  .map((e) => e.payload.value)
// { name: 'User1' }
iterator([options])
Returns an Array of Objects based on the options.

By default the Array is sorted in chronological order, such that the element at index 0 is the first element and the element at the last element is the last element in the Feed.

options : It is an object which supports the following properties

gt - (string) Greater than, takes an item's hash.

gte - (string) Greater than or equal to, takes an item's hash.

lt - (string) Less than, takes an item's hash.

lte - (string) Less than or equal to, takes an item's hash value.

limit - (integer) Limiting the entries of result, defaults to 1, and -1 means all items (no limit).

reverse - (boolean) If set to true will result in reversing the result.

If hash not found when passing gt, gte, lt, or lte, the iterator will return all items (respecting limit and reverse).

const all = db.iterator({ limit: -1 })
  .collect()
  .map((e) => e.payload.value)
// [{ name: 'User1' }]
orbitdb.eventlog(name|address)
Alias for orbitdb.log()

orbitdb.feed(name|address)
Creates and opens a feed database

Returns a Promise that resolves to a FeedStore instance.

const db = await orbitdb.feed('orbit-db.issues')
// Or:
const db = await orbitdb.feed(anotherfeeddb.address)
Module: orbit-db-feedstore

See the Store section for details of common methods and properties.

add(data)
Returns a Promise that resolves to the multihash of the entry as a String.

const hash = await db.add({ name: 'User1' })
get(hash)
Returns an Object with the contents of the entry.

const event = db.get(hash)
  .map((e) => e.payload.value)
// { name: 'User1' }
remove(hash)
Returns a Promise that resolves to the multihash of the entry as a String.

const hash = await db.remove(hash)
iterator([options])
Returns an Array of Objects based on the options.

options : It is an object which supports the following properties

gt - (string) Greater than, takes an item's hash.

gte - (string) Greater than or equal to, takes an item's hash.

lt - (string) Less than, takes an item's hash.

lte - (string) Less than or equal to, takes an item's hash.

limit - (integer) Limiting the entries of result, defaults to 1, and -1 means all items (no limit).

reverse - (boolean) If set to true will result in reversing the result.

If hash not found when passing gt, gte, lt, or lte, the iterator will return all items (respecting limit and reverse).

const all = db.iterator({ limit: -1 })
  .collect()
  .map((e) => e.payload.value)
// [{ name: 'User1' }]
orbitdb.docs(name|address, options)
Creates and opens a docstore database

Returns a Promise that resolves to a DocumentStore instance.

const db = await orbitdb.docs('orbit.users.shamb0t.profile')
// Or:
const db = await orbitdb.docs(anotherdocdb.address)
By default, documents are indexed by field _id. You can also specify the field to index by:

const db = await orbitdb.docs('orbit.users.shamb0t.profile', { indexBy: 'name' })
Module: orbit-db-docstore

See the Store section for details of common methods and properties.

put(doc)
Returns a Promise that resolves to the multihash of the entry as a String.

const hash = await db.put({ _id: 'QmAwesomeIpfsHash', name: 'shamb0t', followers: 500 })