Schlagwörter » Database

Structure of typical job info table in jproj

MariaDB > describe dc_03_reconJob;
+-----------------+---------------+------+-----+-------------------+-----------------------------+
| Field           | Type          | Null | Key | Default           | Extra                       |
+-----------------+---------------+------+-----+-------------------+-----------------------------+
| id              | int(11)       | NO   | PRI | NULL              | auto_increment              |
| run             | int(11)       | YES  |     | NULL              |                             |
| file            | int(11)       | YES  |     | NULL              |                             |
| jobId           | int(11)       | YES  |     | NULL              |                             |
| timeChange      | timestamp     | NO   |     | CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |
| username        | varchar(64)   | YES  |     | NULL              |                             |
| project         | varchar(64)   | YES  |     | NULL              |                             |
| name            | varchar(64)   | YES  |     | NULL              |                             |
| queue           | varchar(64)   | YES  |     | NULL              |                             |
| hostname        | varchar(64)   | YES  |     | NULL              |                             |
| nodeTags        | varchar(64)   | YES  |     | NULL              |                             |
| coresRequested  | int(11)       | YES  |     | NULL              |                             |
| memoryRequested | int(11)       | YES  |     | NULL              |                             |
| status          | varchar(64)   | YES  |     | NULL              |                             |
| exitCode        | int(11)       | YES  |     | NULL              |                             |
| result          | varchar(64)   | YES  |     | NULL              |                             |
| timeSubmitted   | datetime      | YES  |     | NULL              |                             |
| timeDependency  | datetime      | YES  |     | NULL              |                             |
| timePending     | datetime      | YES  |     | NULL              |                             |
| timeStagingIn   | datetime      | YES  |     | NULL              |                             |
| timeActive      | datetime      | YES  |     | NULL              |                             |
| timeStagingOut  | datetime      | YES  |     | NULL              |                             |
| timeComplete    | datetime      | YES  |     | NULL              |                             |
| walltime        | varchar(8)    | YES  |     | NULL              |                             |
| cput            | varchar(8)    | YES  |     | NULL              |                             |
| mem             | varchar(64)   | YES  |     | NULL              |                             |
| vmem            | varchar(64)   | YES  |     | NULL              |                             |
| script          | varchar(1024) | YES  |     | NULL              |                             |
| files           | varchar(1024) | YES  |     | NULL              |                             |
| error           | varchar(1024) | YES  |     | NULL              |                             |
+-----------------+---------------+------+-----+-------------------+-----------------------------+
30 rows in set (0.00 sec)

Replicate Database from a remote db

User can replicate remote db into local couchdb or viceversa using following command on the terminal:

curl -H 'Content-Type: application/json' -X POST http://127.0.0.1:5987/_replicate -d ' {"source": "http://username:password@remotedbUrl","target": "http://127.0.0.1:5987/accents/", "create_target": true, "continuous": true} '

CouchDB

Delete a CouchDB database from curl

The couchdb database can be deleted from terminal using the following command:

curl -vX DELETE http://username:password@dburl

CouchDB

Update database with php and json array

This php script shows how to grab ajax sent from javascript and update in data base, it handles multiple updates.


<?php

$request = json_decode($HTTP_RAW_POST_DATA, true); //Grab the json sent by javascript ajax
$action  = strtolower($request['action']); //Same here see what action was sent
$data    = $request['data']; // query if data was sent

switch($action) {
case 'update':
// open data base to update the fields
$max = sizeof($data); // see if the $data has size
// is $data array and is not empty? noch 63 Wörter
Tutorials

Mongoose gotchas

I am using Mongoose since last few months and while querying MongoDB in Node.js and getting results. While doing that I came up with some cases that made me scratch my head for more than couple hours just to figure our it is little ‘gotcha’ (may be because I did not read through all the docs of Mongoose). noch 573 Wörter

Java Script

SQL Server 2014 - Unable to add AlwaysOn AG Listener

SQL Server 2014 – Unable to add AlwaysOn AG Listener

We need Availability Group(AG) listener to enables a client to connect to an availability replica without knowing the name of the physical instance of SQL Server to which the client is connecting. noch 119 Wörter

Database

A Single Source

The Failure Of The Global Repertoire Database
Trying to source copyrights and royalties is like trying to trace your ancestry without the help of DNA and a geneologist. noch 208 Wörter

Music Business