0
votes

I downloaded and installed Oracle SQL Developer on my computer. I connected to my company's database. However, as I'm still learning SQL queries - I would like to test out the queries that I wrote on a mock database.

My question is how do I create a database?

I searched through the internet and tried the following.

On the New/Select Database Connection Menubox I typed in the following:

Connection Name: HR_ORCL

Username: HR

Password: HR

Connection Type: Basic

Role: default

Hostname: localhost

Port: 1521

SID: ORCL

I then clicked on test and got the following error message: "Status: Failure-Test failed: IO Error: The Network Adapter could not establish the connection".

How do I create a mock database?

Thank you!

2
Oracle SQL Developer is a client tool, it does not contain the database server component. You need to install and configure the server on your computer first. If this is on a company machine you will run into licensing issues (because that's Oracle's business model) so I recommend using an alternative DBMS like PostgreSQL or SQL Server Express unless you really need to learn PL/SQL instead of other dialects. - Dai
You installed SQL Developer, Now What? - your options for getting a database to 'play with' medium.com/oracledevs/… - thatjeffsmith

2 Answers

0
votes

Oracle's flagship database product is a "client/server" system where databases run inside a server process that often runs on a dedicated database server computer, all other client software (including business web-applications, web-services, desktop software and development tools like Oracle SQL Developer) are separately run and do not require the database server be running locally.

To create a database that runs on your computer you need to install the Oracle database server on your computer. Given Oracle's business model of turning software licensing audits into a very profitable business model you likely won't get approval from your company's IT people to install Oracle server on your local machine: they'll either set you up with your own private database instance in an existing server for you to play with or instruct you to install a different (and free) database server not covered by Oracle's licensing schemes - these different products use a different dialect of SQL (e.g. MS SQL Server uses T-SQL, Oracle uses PL/SQL, etc) and different DBA and development tools (e.g. SSMS+SSDT instead of Oracle SQL Developer).

0
votes

There's multiple options to getting a free Oracle database.

XE 18 was recently released here:

https://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

There's a developer day vm that has labs inside it along with a database here:

https://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html

There's the docker option outline by Tim Hall here:

https://oracle-base.com/blog/2018/07/26/oracle-database-18-3-0-and-docker/