Using SQL Queries


SQL (or Structured Query Language) is a powerful language used to create, alter, or delete components of a database. There are probably thousands of resources on the Web that will teach you how to use SQL. I will provide you with a few simple queries to do day-to-day administrative tasks, but you are encouraged to look elsewhere to learn more powerful queries. It is important to understand what you're doing when submitting a query -- you can easily destroy an entire database in the matter of seconds with a few words of SQL.

Before looking at SQL, it is important to understand the structure of the Basmati database. The chart below provides a snapshot of the tables and fields within the database:

Tables: CLIENTS COURSEINFO GMSCORES GROUPS PERSONAL SCHOOLS
Fields:
  • client_id
  • client_pw
  • client_school
  • client_expdate
  • client_fullname
  • webinfo
  • webinfodate
  • cc
  • schoolid
  • facultyname
  • facultycode
  • period
  • email
  • phone
  • misc
  • coursename
  • assignlist
  • assignvals
  • ealr
  • modified
  • type
  • sid
  • cc
  • schoolid
  • scores
  • percent
  • grade
  • comments
  • groupname
  • groupsids
  • grouppw
  • schoolid
  • sid
  • schoolid
  • last
  • first
  • grade
  • password
  • did
  • emailaddress
  • school_id
  • school_name
  • school_state
  • school_city
  • school_url

A more complete description of each field is pending.

Again, please consult many of the excellent references on SQL for more details (and more powerful queries).