A
A
Alexander Panov2018-11-28 10:05:47
Database
Alexander Panov, 2018-11-28 10:05:47

And who generally works with a DB through the console?

I apologize for this question, but I was just curious. Someone else's experience, so to speak.
I myself fell in love with something in the console to work, "I'm not a master yet, I'm just learning."
Usually, when developing, you put a database, muscle, postgres, oracle, ms skl. After installation, you immediately turn on your IDE and there you start with the database, do whatever you want.
But before that, you usually need to either configure it after installation, or share the rights there, then for this you climb into the console, and in console mode, you work on the database.
And what vendor do not take when doing SELECTit, and if there are a lot of columns or lines, then usually it does not fit into the console, and the output turns into fear and horror.
And here, with an awakened interest in console use, I now want to do everything from the console :)
Hence the question, does anyone have experience in working / developing / maintaining a database from the console, is it convenient? are there any benefits ?, or is the console like a “blue screen of death”, is it needed purely for when there is nothing else left?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
Melkij, 2018-11-28
@miroque

We are working. Constantly. I don't have any GUI installed for any database
. In psql, the output of a large number of rows is solved by the regular \pset pager {on,off,always}, a large number of columns is usually more convenient to look at in expanded form (\x).
Or take less as PAGER and get table scroll both horizontal and vertical:

export PAGER='/usr/bin/less -S'
psql

For the mysql client, I only remember the expanded \G output after the query:
mysql> select * from users \G
*************************** 1. row ***************************
        id: 104
      name: NULL
    gender: 0
birth_date: 0
     phone: NULL
1 row in set (0.00 sec)

On the client to oraklu I will tell nothing, did not see.

I
Ivan Shumov, 2018-11-28
@inoise

From the console, you can only configure the database server. No other benefits

K
Konstantin Tsvetkov, 2018-11-28
@tsklab

Yes. For MS SQL, for example, the delivery includes an extension for PowerShell. If the project includes SQL scripts, then you can use the console to execute them. When you execute a SELECT in the console, you can output data to a text file.

H
Hanneman, 2018-11-28
@Hanneman

Your question is purely rhetorical. It all depends on the specifics of the tasks. I have been working daily with database tables from the console under SunOS for 15 years now. What am I doing wrong?

A
AVKor, 2018-11-28
@AVKor

Yes.
Just do not do this under Windows - there is a poor terminal, there is no history (MySQL, at least).

S
stratosmi, 2018-12-01
@stratosmi

Yes, automated operations.
Upload-download, migration.
Occasionally - checking some assumptions - writing queries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question