How can I add a database in plugin Database Navigator (Intellij Idea Community)? - postgresql

I already have a database in this manager dbs, but I have not found an opportunity to add another database to the deployed Postgresql DBMS. In the Intellij Idea Ultimate version, the database manager can do this. I can't find such a feature in the Database Navigator plugin.
I created a schema and thought to make a new database in it. But it didn't work out. Here, each database should have its own session and its own connection (I think so).
Can someone tell me how to do it ?

If you want to add another database, you should use the console for that. So, you will be able to write the query for creating this new one.
First click on your db. Once done you will write you query in the console located at the left. Follow the image to do this.
Hope this will be help you.

Related

IntellijIdea Mongo connection too slow and lack of capabilities

I'm trying to use IntellijIdea in order to connect to MongoDB but it seems to work too slow. A simple read request might take up to 5 secs meanwhile Robo 3T works almost instantly. Is it a common and known behavior (some issue with mongo driver for example) or is it my local issue?
Also I can't find how to manage collections\databases via GUI. Let's say I want to create a new database: I right-click in order to get a context menu, go to "new" section and everything I can do is to add a new datasource, driver or just jump to console.
Also I can't find db users for the given database. There is just no such folder under selected db.
Can I do such kind of management via IntellijIdea database GUI?
Unfortunately we found a problem with latest MongoDB driver, which causes slow operations. Please open up data source properties, switch to Drivers tab, select MongoDB and switch to v.1.11.
And I've created 2 feature request based on your feedback, please follow and vote to get noticed on any updates:
For database management GUI https://youtrack.jetbrains.com/issue/DBE-14252
For user list https://youtrack.jetbrains.com/issue/DBE-14253

search for an object in pgadmin 4

maybe it's a silly question but in the "ancient" pgadmin 3 there was a tool to search for an object (table, column, trigger function...) based of some pattern. I can't find such tools in pgadmin 4 (I just installed the latest release 4.8) This makes me waste a lot of time. where is it? Is there another way to search or some workaround? thanks in advance! Jacopo.
as documented here, there is such functionality in pgadmin4, you can find it by right-clicking a database inside a server as shown here:

MySQL Workbench: Beautify/Reformat option doesn't work when I write stored procedures

I recently installed MySQL Workbench 6.3. When I write queries the Beautify/Reformat option works fine. But that's not the case when I write stored procedures. If I click the corresponding button nothing happens and also the menu in Edit -> Format is inactive. Since it is a useful feature I would be very grateful if someone could give information about this issue. Is it probably related to the specific version of MySQL Workbench or are there any settings that should be altered, etc.?
Thank you in advance.
After filing a bug report at bugs.mysql.com it was confirmed that the problem was associated with the specific build of the MySQL Workbench 6.3 which was not the last one. This problem does not exist in later versions, for example the current newest version which is 8.0.13.

database in not updating for application version 2

I have developed application which is related to sqlite database.
when added enhancement for the application there is change in database, so i have changed database by adding extra tables into existing db.
Now when all-ready exist application in device [which is version 1] update to new feature of the app. The database is not changed for version 2.
Can any one give me advice how to reflect the db for the version 2.
#advance Thanks
I have answered a similar question here, I think it can help you. The idea is to detect if your app is launching for the first time after the installation or not. If it is launching for the first time after the installation you might delete your old tables or update them... The link above illustrates how you can detect if it is the first time launch or not.
Check when Opening the connection to the Database that you run
CREATE TABLE IF NOT EXISTS
I have this in my database init
Thus checking each time that the tables exist and if not re-create them.
Then I can always drop and table and have it re-created
Or When updating and adding new tables it will check also and add any new tables

How to properly delete and re-add Entity Data Model

newbie to Entity Framework here. Using VS 2010 and SQL Server 2008 express DB.
I was having trouble refreshing an Entity Data Model after adding new tables. So, I followed a suggestion I found here to just delete and regenerate the model.
I get to the "Choose Your Data Connection" section of the Entity Data Model Wizard and "Save entity connection settings in Web.config as:" is checked. However, my existing name has a 1 appended to it. For example MyDatabaseEntities is now MyDatabaseEntities1. Of course, I don't want the "1" appended. I killed the existing connection string in Web.config and removed all references to that name in my solution. Yet when I try to continue I'm presented with the following error:
"'MyDatabaseEntites' conflicts with an existing property name in the Application Settings. Please choose a different name"
I can't find a reference to that name anywhere in the solution. I can uncheck that option and it will continue, but it STILL won't add two of the tables in the database. Next, I completely shut everything down, rebooted, and tried again. This time I didn't get the error above, but two of my three new tables still do not get added to the edmx model.
Any ideas are appreciated. Also this seems like it's still pretty buggy even in VS2010/.NET 4. Help restore my faith...I feel like abandoning Entity Framework at this point. Based on my experience so far and some of the other issues posted here, I feel like I'm going to spend more time chasing Entity Framework strangeness than writing useful code.
UPDATE: I found a resolution. The designer doesn't display errors. You have have to look in the native XML (edmx file) to see the errors. See here: ADO.NET Entity Framework: Update Wizard will not add tables
The error is caused by leftover connection strings in settings in "App.Config" file (see solution explorer) and it's in this section:
"connectionStrings" (surrounded by angle brackets)
Just delete it from there.
Restart IIS if you develop web app.
Restart Visual Studio After Deleting The EntityDataModel Connection
String Line from web.config or app.config
Add New Entity Data Model and rename it like old name,
I don't know the specific answer to your problem, but I think I can recommend an approach that will clear up this conflict.
I generally break my EF work into a separate library. If I'm working on Cyberdyne.Terminator, I make an EF class library called Cyberdyne.Terminator.Data. That way, if you want to blow away the model and start over, everything is separate from your dependent files, and in particular, your web.config.
None of this is likely to fix the missing tables, probably. The one thing I've seen where this happens is if I add a table, and then delete it. It will not appear again in the "Add Tables" dialog (and you have to rename it to get it to show). But I thought that was fixed in EF 4.0. Dunno. If the problem persists you might try renaming the table, re-adding it, and then renaming it back if it shows up.
EF is a pain in the ass to be sure. The only thing I can tell you is that I've generally had to work through these headaches, learn the issue, and never be bothered by them again. If you can't stand EF, you might also look at NHibernate - I have a very strong impression of that as well.
Double check your connection strings, and keep scrolling to the right. Most often, when this happens to me, Visual Studio has appended a connection string behind another. I've done this a couple times, and wondered where my app config was (no, there is no app config, just web config in mvc), so the dialog is a little confusing. Sure enough, most likely that connection string is lurking directly behind another!
Just press
Ctrl+F
keys and in dropdown list select 'EntireSolution/CurrentProject', then press enter. where ever this name generated it will show you.
I get into web.config file. so delete that generated complete connection line from there. and re add it again. Then hope you may not get this message again.Thank you..
Actually this is frustrating, since you trying to see in app.config that if there's a another string and you see only 1 string, Actually What VS does is sometimes append second string in the same line. see this picture below
Does it look like there are 2 ConnectionStrings? (ACTUALLY YES)
Now, see this pic:
Also you can press Ctrl+ED to format the config file and see if there's another second string hiding somewhere. Hope this will help someone.
im so sorry for my english
but the solution is simply.
you have to delete the ado.net
then, go to app.conf and delete the connection string<>,
DEBUG your project and finally add the new database through ado.net
TO ADD ADO.NET
RIGHT CLICK ON YOUR PROJECT NAME, THEN, ADD NEW ITEM, DATA AND SEARCH ADO.NET...
I hope help you, have good day!
angelsantacruzm