Tutorial by Examples: bases

A database snapshot is a read-only, static view of a SQL Server database (the source database). It is similar to backup, but it is available as any other database so client can query snapshot database. CREATE DATABASE MyDatabase_morning -- name of the snapshot ON ( NAME=MyDatabase_data, -- l...
If data in a source database becomes damaged or some wrong data is written into database, in some cases, reverting the database to a database snapshot that predates the damage might be an appropriate alternative to restoring the database from a backup. RESTORE DATABASE MYDATABASE FROM DATABASE_SNAP...
Method 1: Below query will be applicable for SQL Server 2000+ version (Contains 12 columns) SELECT * FROM dbo.sysdatabases Method 2: Below query extract information about databases with more informations (ex: State, Isolation, recovery model etc.) Note: This is a catalog view and will be availa...
One of ColdFusion's strengths is how easy it is to work with databases. And of course, query inputs can and should be parameterized. Tag Implementation <cfquery name="myQuery" datasource="myDatasource" result="myResult"> select firstName, lastName from...
By default, migrations are applied to the same database specified by the db application component. If you want them to be applied to a different database, you may specify the db command-line option like shown below: yii migrate --db=db2
In the Project.pro file we add : CONFIG += sql in MainWindow.h we write : #include <QMainWindow> #include <QSql> #include <QDebug> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget...
In the Project.pro file we add : CONFIG += sql in MainWindow.h we write : #include <QMainWindow> #include <QSql> #include <QDebug> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget...
The normal obj.save() method will use the default database, or if a database router is used, it will use the database as specified in db_for_write. You can override it by using: obj.save(using='other_db') obj.delete(using='other_db') Similarly, for reading: MyModel.objects.using('other_db').al...
Mongo supports database-to-database copying, which is useful if you have large databases on a staging database that you want to copy into a local development instance. // run mongod so we can create a staging database // note that this is a separate instance from the meteor mongo and minimongo ins...
library(RODBC) con <- odbcDriverConnect("driver={Sql Server};server=servername;trusted connection=true") dat <- sqlQuery(con, "select * from table"); close(con) This will connect to a SQL Server instance. For more information on what your connection string should loo...
With this example, you will be able to perform following operations: Connect to Firebase Storage Create a directory named “images” Upload a file in images directory Download a file from images directory Delete a file from images directory public class MainActivity extends AppCompatActivity...
In the Project.pro file we add : CONFIG += sql in MainWindow.h we write : #include <QMainWindow> #include <QSql> #include <QDebug> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget...
SAS is an integrated system of software solutions that enables you to perform the following tasks: data entry, retrieval, and management report writing and graphics design statistical and mathematical analysis business forecasting and decision support operations research and project managemen...
General Using the package RMySQL we can easily query MySQL as well as MariaDB databases and store the result in an R dataframe: library(RMySQL) mydb <- dbConnect(MySQL(), user='user', password='password', dbname='dbname',host='127.0.0.1') queryString <- "SELECT * FROM table1 t1 JO...
Resolving scoped services during application startup can be difficult, because there is no request and hence no scoped service. Resolving a scoped service during application startup via app.ApplicationServices.GetService<AppDbContext>() can cause issues, because it will be created in the sc...
The following databases exist for MySQL's use. You may read (SELECT) them, but you must not write (INSERT/UPDATE/DELETE) the tables in them. (There are a few exceptions.) mysql -- repository for GRANT info and some other things. information_schema -- The tables here are 'virtual' in the sense ...
The following commands can be used to swap the names of two MySQL databases (<db1> and <db2>): mysqladmin -uroot -p<password> create swaptemp mysqldump -uroot -p<password> --routines <db1> | mysql -uroot -p<password> swaptemp mysqladmin -uroot -p<password&gt...
show dbs or db.adminCommand('listDatabases') or db.getMongo().getDBNames()
r.connect({host: 'localhost', port: 28015}) .then((conn) => { return r.dbList().run(conn); }).then((result) => { // Prints out list of databases on the RethinkDB instance console.log(result); });

Page 1 of 2