Database notes, operations guides, and SQL lessons.
The original BlinkSQL writing library, now wrapped in the new learning-platform design language.
Vi editor in Linux
Its a visual editor by default installed in every linux system. The next version of vi is vim. The vi editor tool is an…
Nov 8, 2022 PostgreSQLInstall PostgreSQL
1. yum install postgresql-server postgresql-contrib 2. su postgresql 3. postgresql-setup initdb 4. vi /var/lib/pgsql/data/pg_hba.conf 5. Find the lines that look like this near the…
Feb 7, 2018 UncategorizedMonitoring in Postgresql
In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table. They remain present until a VACUUM is done.…
Feb 5, 2018 UncategorizedRestore Oracle DB in Linux
To restore a database from the default directory /backup/rman use the cmd cmd: RESTORE DATABASE; Restore Specific Tablespace: Instead of restoring the full database, you…
Jan 31, 2018 UncategorizedBackup Oracle DB using RMAN in linux
1. View Current RMAN Configuration Before we take the backup, we have to configure certain RMAN parameters. For example, how long you want to…
Jan 31, 2018 UncategorizedOracle DBA Roles
A database administrator's responsibilities can include the following tasks: Installing and upgrading the Oracle Database server and application tools Allocating system storage and planning…
Jan 31, 2018 UncategorizedOrcale DataBase Set up in Windows
Go to orcale.com Go to downloads as shown in the image and select the compataible version of the system by accepting the license and…
Jan 30, 2018 UncategorizedMongoDB
Features: ->MongoDB is a No SQL database. It is an open-source, cross-platform, document-oriented database written in C++.C-> It stores data as documents, so it is…
Dec 12, 2017 UncategorizedSQLite
-> SQLite is an open source, zero-configuration, self-contained, stand alone, transaction relational database engine designed to be embedded into an application. -> SQLite does not…
Dec 10, 2017 UncategorizedBasic Commands in Mysql
-> This is the world's second most popular and widely used open source database. -> All the database names, table names and table fields name…
Dec 10, 2017 UncategorizedOracle Notes
-> Its relational database management system used in enterprise applications. -> Its biggest competitor is Microsoft SQL Server. -> Runs on Windows,Unix,Linux and Mac…
Dec 10, 2017 UncategorizedTo Find the nth highest and least salary
1. To Find the nth highest salary Eg: General query for all Database SELECT DISTINCT salary FROM emp X WHERE n = ( SELECT…
Dec 7, 2017 UncategorizedHigh Availability, Load Balancing, and Replication
High availability: Database servers can work together to allow a second server to take over quickly if the primary server fails. Load balancing: To…
Nov 29, 2017 UncategorizedPostgresql Basics
Create Database: -> A database is a named collection of SQL objects ("database objects"). Generally, every database object (tables, functions, etc.) belongs to one…
Nov 29, 2017 UncategorizedRoles in Postgresql
-> A role can be thought of as either a database user, or a group of database users, depending on how the role is…
Nov 28, 2017 UncategorizedUseful Linux Commands
To list all the users: cmd:cat /etc/passwd To delete the user in linux: -> we can able to delete the users from ther root…
Nov 28, 2017 UncategorizedImportnat Parameters in postgresql.conf file
listen_addresses (string) -> Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. -> The special entry '*'…
Nov 28, 2017 UncategorizedRename Table in Postgresql
-> To rename already existing table Syntax: ALTER TABLE table_name RENAME to new_table_name; Eg: Alter table attribute rename to attribute1; -> To rename a…
Nov 27, 2017 UncategorizedCase in postgresql
-> If we want to retrun boolean value from the query or more than one result based on the condition then we can use…
Nov 26, 2017 UncategorizedTruncate Table Locks
-> To truncate the instance table locks i.e. when one user locked the object and the user wants to lock the same object then…
Nov 26, 2017 UncategorizedConstraints in Postgresql
Constraints: ->Constraints are the rules enforced on data columns on table. -> These are used to prevent invalid data from being entered into the…
Nov 26, 2017 UncategorizedExtensions in Postgresql
-> Its helpful to collect all objects into a single package is called extension. Eg: If a new data type will require new functions,new…
Nov 24, 2017 UncategorizedPostgreSQL Database Administration Commands
Version of PostgreSQL: cmd:select version(); Creating the user in the shell prompt: cmd:create user postgres_user; Creating the database in the shell prompt: cmd: /usr/local/pgsql/bin/createdb…
Nov 22, 2017 UncategorizedCreate postgreSQL user account
-> After the installation of postgresql we need to create the user account for the postgresql. -> For this login as root and then…
Nov 22, 2017