We are giving you two options this quarter to fulfill your relational database needs. The first (SQL Server) is available on NT, while the second is available on Linux. Enjoy!

To use SQL Server:

  • Log into a NT machine with SQL server installed (any machine in Sieg 232 or 326 should work).
  • Start the "Query Analyser" from the start menu (under SQL Server 7.0, perhaps).
  • When it asks use RDBSRV1 as the server, and Windows NT authentication.
  • You should then get a window. At the top of that window you can choose a database. Choose "pubs".

    You can now create tables and enter queries. Notice that if someone else has already done the create statements, then the tables will be there for you to use. If not, you can paste them in from this file. Use the little green arrow to get the system to process what you have typed in.

    You can find quite good documentation in the SQL Server Online Books.

  • To use PostgresQL:

  • Log into an undergraduate instructional linux machine (e.g. sumatra).
  • Setup your environment:
    ( in csh/tcsh )
    
      setenv PATH ${PATH}:/uns/pgsql/bin
      setenv LD_LIBRARY_PATH /uns/pgsql/lib
    
    This is where your database will be created:
      setenv PGDATA ~/databases
    
  • Initialize your database directory:
      initdb -l /uns/pgsql/lib/
    
  • Start the server:
      postmaster &
    
  • Create your database:
      createdb cse544
    
  • Start the UI:
      psql -d cse544
    

    You are now in a SQL frontend to PostgresQL, you can create your tables (by pasting in this file - notice it is different from the one used for SQL Server) and enter your queries.

    More documentation can be found at http://www.postgresql.org/, along with the source code. Notice that you need a ';' (semicolon) after each line in order for it to be processed.

  • Send me (bart@cs) mail if you have troubles or questions.