How can I export my Oracle database as a file? - database

I am dealing with a Java web project for my course. I have been told to add my database file too while sending my homework. However, I have no idea about database file since I am using a database in a project for the first time. I am using Oracle 11g database for storing and manipulating necessary data.
I have written several JSP scripts. I access to the Oracle database while running these files with the line
connection=DriverManager.getConnection("jdbc:oracle:thin:#localhost:1521:xe","selubamih","123456");
But I am not sure how can I send this database to my teacher because I am using it through the connection with my password. How can I export the database to send it as a file along with my JSP codes? I searched files for keeping databases, it seems like .csv and .db are most commonly used extensions. Should I export my database as one of these files? If so, how can I export my database? I will appreciate any of your help.

Related

Exporting a Database using Oracle SQL Developer

I've done a database using Oracle SQL Developer for a University exam. Now, I've to send it to my Professor by email.
It's possible to export the database completely as one directory, containing all files I've created, in order to allow my Professor to import it into SQL Developer and test it?
I've tried using "Tools">"Database Export" but I've obtained only a lot of separate files.
Wrong, I'm afraid. You've (tried to) export just one schema, not entire database.
Anyway: if you got bunch of files, then it is because you instructed the tool to do so. Next time choose single file:

What happens to data stored in my local MySQL workbench when a website is taken live?

if for instance I have a form in my website which when filled stores the input data to my local mysql workbench based on the php code that enables access to the database. What becomes of this database when I decide to take the website live? Seeing us unlike the .CSS, .JS and .PHP files that can be put in one folder and uploaded.
MySQL Workbench does not store any of your data. It's a client like many others (e.g. the MySQL shell). You should read up on the client-server-model concept to understand how the MySQL server and a client like MySQL Workbench work.

how do i determine oracle database name of data source

I've been searching around and haven't found anything on my scenario that I understand:
I have a list of all of the Oracle databases and corresponding servers that my company owns (about 80 servers 150 databases). I am trying to figure out which one a specific file is being downloaded from (from a webpage).
I am mechanical engineer, not in software so if you could eli5 that would be very helpful.
Specifically I need the SID name, but figuring out the server name
would also be helpful.
Your question is kind of tricky here. if your downloading the file from web application(I assuming it is a Java webapp), oracle database could act as either the data store or a report server that can generate the oracle reports directly
In the first case, you need to find out if what kind of file you are downloading?
is it a PDF? is it a excel file? or just text file or anything? the best idea is to check out the file link and then decide what software generating this file. it could be any software in back end to generate the file like, POI(for generating excel file), or even a direct file link, but not oracle at all.
Also, In this case, the file is usually generated at backend by server-let. You need ask the developer which report or file generating engine they are employing. and if oracle database is also being used, it is usually providing the data fro that report or file engine.
In the second case, you can just check out the the URL and give it to the webmaster asking them which oracle server it is using. it is usually configured in the web server.

Data Base Migration from Btrieve (6.15 for WIN 95) to Oracle/Postgre?

I'm doing a kind of experiment for which i need Btrieve (not Pervasive SQL/PSQL) DataBase files (db tables). I have Googled a lot but didn't find any db files, any help guys? The basic requirement is to migrate the Btrieve DB to Oracle/Postgre DB.
can someone provide me DB files or link to DB files?
for example: a sample project which uses Btrieve DB
A long time ago I specially install Delphi and Titan Btrieve components to extract data from btrieve tables.
In Titan Btrieve Manager (can't remember name) you must create connection (specify folder with files) and then use it in Delphi components of Titan Btrieve.
Can't provide files but i think you can use this component to create tables.
First off, Btrieve files and Pervasive SQL / PSQL files are the same. Second, most data files are going to have proprietary data in them so having people send you files will probably not happen.
If you have a Btrieve / Pervasive PSQL engine, which you need to read data files, then you can create a program to create data files and fill them with random data.
Also, there are some sample data files included with the engines in a DEMODATA directory.

phpmyadmin and the database

Not sure I fully understand what phpmyadmin does.
I created a database in phpmyadmin, and would now like to start accessing the data in it from php. However I have no idea where the database is?
Should I export in the phpmyadmin software? I tried that but it came up with a .sql file which can be opened in notepad and contains the SQL statements used to create the datbase and the one table inside. Basically that doesn't look like a database to me.
phpMyAdmin is just an interface to work with an existing MySQL database server. However you have configured phpMyAdmin to access the MySQL database is the same information you need to access it through PHP. You will need the server name/ip, username and password.
There are many tutorials available online that can help you get started.
phpMyAdmin is an application, written in PHP, to provide a convenient interface to your MySQL database in the browser. It's not needed in anyway to connect to the database server from PHP. To do the latter, you'd typically find the right function names from the PHP documentation and get some examples. Start here, for example: http://www.php.net/manual/en/book.mysql.php (and investigate mysql vs. mysqli vs mysqlnd options).
Your MySQL server will usually run on localhost:3306, but you have probably entered those details while setting up the phpMyAdmin install, anyway.
PHPMyAdmin is only a graphical front-end to the mySQL database.
PHP has built-in functions to access a mySQL database, those are totally separate from phpMyAdmin.
For reference, here is the PDO documentation which is one of several methods to access PHP, and definitely one of the more recommendable ones.
It is recommendable over mySQL because it supports parametrized queries by default, the lack of which made many PHP applications based on the standard mysql_* family of functions vulnerable to SQL injections. That is not to say that it's not possible to program safe scripts with the mysql_ functions, but PDO makes it easier.
The docs are a bit tough to get started with the subject, though. I'd wait, I'm sure someone will link to some good english-language tutorials.
The MySQL server runs on a known port on a given server (EG: localhost), with a given database (EG, it might be called: "myDatabase"). You should be able to configure phpMyAdmin to point to that server, host, and database.
You have to write your own php code to interact with mysql.
phpMyAdmin is a tool to interact with mysql independantly of your own website.
When you EXPORT using phpMyAdmin it is basically taking what is in the database and creating a text file of its contents that you can save for backup. If you want to restore the backup, go into phpmyadmin and paste that text file into SQL and it will put it back.
There are PHP commands to use to retrieve, and store data from your database. I recommend you look at the php website for mysql functions.
There are some good examples there.

Resources