Page 242 - Open Soource Technologies 304.indd
P. 242
Web Technologies-I
Notes vendors, but the implementation of the full standard in all cases is not a guarantee. The common
work-horse functions are the same in most cases.
An easy way to understand how this works is to imagine, you need to instruct someone to
list the vendors your company uses. You have to write the instructions to perform this action.
Before relational databases you would have to write the instructions to cover walking down to
accounting, looking for the right file cabinet, opening it, finding the correct files, opening each
of them and copying all the names down. If someone else was using a file you needed, you
simply had to wait until they finished. Since relational databases came into existence those steps
have been reduced to a single phone call and the uttered phrase, “SELECT * FROM VENDORS.”
SQL is a very human readable language. It does have syntax rules, but it is not as hard as
learning a programming language. The most basic types of queries are SELECT, INSERT and
UPDATE. SELECT searches for data, INSERT adds data and UPDATE changes existing data.
DELETE is also fairly common, but we end up using it to clean up bad records by hand rather
than in a program.
10.2.2 Security
Relational databases also have excellent security. In most database programs there is a special
database that contains access permissions for users and databases. This allows a database
administrator the ability to tune permissions to needs. The basic set of permissions in MySQL
includes the following:
• Select Priviledge - Ability to search data in tables
• Insert Priviledge - Ability to add data in tables
• Update Priviledge - Ability to modify data in tables
• Delete Priviledge - Ability to delete data in tables
• Index Priviledge - Ability to index tables
• Alter Priviledge - Ability to alter tables
• Create Priviledge - Ability to create databases
• Drop Priviledge - Ability to delete databases
• Grant Priviledge - Ability to delete databases
• Reload Priviledge - Ability to reload database privileges
• Shutdown Priviledge - Ability to shutdown the database program
• Process Priviledge - Ability to change the individual threads running in the database
program
• File Priviledge - Ability to import / export data from / to files
The administrator has a special account that has all the privileges to start with and can be used
to create custom accounts. If you intend to run a database yourself, you will have to create
databases and assign permissions yourself.
10.2.3 MySQL Tools
MySQL is a freely available yet full featured relational database. It has a number of tools to
manage the databases it operates, but there are only three which you can use regularly and
only one of those is necessary if you are not managing the database yourself. The command is
“mysql” and it is a shell that allows an operator to enter SQL commands directly to the database.
236 LOVELY PROFESSIONAL UNIVERSITY