Accessing data in a database using a high level language
Introduction
Databases are not much use unless you can get access to the data in them. If you are working solely on a DBMS on an organisation's database, then you will probably have all the tools you need to access the data in the database. You will be able to run queries, generate reports, retrieve, amend, delete and add data and other things besides. There will be times, however, when you are writing an application, and that application needs access to some data in a database.
High level language access to data in a database
All high level languages have instructions that allow them to connect to an external data source such as a database. Once connected, they can then carry out the usual types of activities. These include:
-
- searching through data for a specific piece of data
- sorting data into an order
- adding new data
- deleting data
Security
For reasons of security, it is not a good idea to connect an application directly to an external database. It would be possible to corrupt the database accidently. More commonly, an application would connect to a third party piece of software and give any instructions to that software. That software then communicates with the external database that uses SQL, retrieves any data requested and then passes it back to the application. Structured Query Language is just the software that actually interrogates the data in a database.
By having this 'buffer' program between your application and the external database, you can't accidently mess up the database! Typically, you will know because it is in the public domain, or you will be given the details that allow you to communicate with this third party software so all you have to do is to write the instructions that you need to get back whatever data you want.