2

I am working on a team project in object-relational databases and one of us has made the database in PostgreSQL, and the rest of us will make the application based on that database. How can he export the database for us to use with C# (Visual Studio)? Can Postgres make some file with the database or something similar?

1
  • Don't know why was this questions down voted. Sometimes its just a meter of not knowing which terms to search for. Commented Nov 14, 2012 at 10:08

2 Answers 2

3

@andrefsp is quite right that you'll want probably want to dump the DB schema and then load it into a local PostgreSQL install on your machine for testing.

Additionally, it's often helpful to create some schema visualisation and documentation. I find the free tool SchemaSpy useful for this, but many others exist. It produces a tree of HTML files and images that you can use to browse the database structure.

PgAdmin-III (generally installed with PostgreSQL) also provides some basic tools for looking around the database structure.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the answer :-) What we were looking for really is not the graphic representation of the database but rather some kind of file that would contain the data in the database organised in the way it is expected by the schema and could easily be reached in the code. We will try with dumping the database.
2

Yes, PostgreSQL can do that and much more. What you are looking for is a dump of the database, which is basically a file containing all the database.

Have a look at the official documentation for pg_dump

This command will generate a backup from the original database and than you can use it with a pg_restore command to load the database somewhere else.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.