There are a number of ways you can enter data into a database table. The method you choose will largely depend on your context.
You will need to choose from the following methods:
- Direct entry
- Form
- Structured Query Language (SQL)
- Website or other application
Here's an explanation of those methods.
Direct entry
You can type directly into the table while it's in Data Sheet view. Initially, this may seem like the quickest and easiest method, but it's not suitable if you have lots of data, and/or if non-technical users need to enter data.
Form
If you use a desktop database program (such as MS Access), you can set up a form, so that non-technical users can enter data into the form. Once they submit the form, the data is automatically inserted into our table. The form could insert data into multiple tables too - saving you from having to open up each table to manually insert the data.
Most enterprise database systems don't have the ability for setting up a form. This is probably because they're designed for larger scale applications with hundreds, thousands, or even millions of users. In this environment, a form would be created through other means (for example, using HTML).
Applications such as Access provide a form wizard, which steps you through the process to building a form.
Structured Query Language (SQL)
You can use a programming language called SQL to insert the data (we could also have used SQL to create the database and tables if we'd wanted to). One advantage of this is that you can save your SQL script for re-use. This could be handy if you need to insert the data into multiple databases.
It's also useful to create scripts that insert "lookup" data - this is generally a base set of data that never changes (such as Countries, Cities, etc). If you ever need to rebuild your database, you can simply run your ready made script against it (which saves you from manually re-entering the data).
Website or other application
You could build a program that uses the database to store and retrieve data. The person entering the data doesn't need to have direct access to the database. They don't even need to have database software. By using SQL, your database could be part of a larger application - such as a website.
This is probably the most common method of adding data to a database. If you've ever registered with a website, your details would have been inserted into a database using this method.
No comments:
Post a Comment