The department has the following policies for the lab:
When the computer is ready, you will see a login screen. Type the login and password given to you in lab. This will be your account for the semester and will also work if you would like to log directly into comet from home. These accounts will be deleted at the end of the semester. Any student wishing a permanent unix account should inquire about an alpha account at the Information Technology Resource Center.
Click on the terminal icon to bring up a new terminal window (it has a picture of computer on it and is located either on the left hand side of the screen or in the tool bar). In this window, type:
yppasswdYou will then be asked to type your password, along with a new password. For your password, you should choose at least 6 characters, including at least one non-alphabetic character, and you should choose a password not based on a word in the dictionary. Choose something you can remember since if you forget your password, it can only be reset from Mondays to Thursday from 9-4.
Here are some basic commands in unix:
All the user accounts have been created on the server comet and the /home filesystem is remotely mounted using NFS. There are no accounts created locally on any of the workstations. Because of this and the fact that these machines are dual booting systems and they are turned off, you will only be able to send mail out of these workstations. All mail should be addressed as follows:
username@comet.lehman.cuny.eduTo read your mail from these workstations, you will have to telnet to comet and retrieve your mail.
All files for web pages should be placed in the public_html directory located inside your directory. The home page should be named index.html. The URL for each account is:
http://comet.lehman.cuny.edu/username
The dial up phone numbers are: 960-7278 and 960-7279. On the menu choose number 4 for comet.
First, telnet into comet by typing
telnet cometThis is necessary, since most, but not all of the software on comet is available directly in the lab. Next, type
createdb MYNAMElab1where MYNAME is your name. This will create a database for today's lab.
Now, type
pgaccess MYNAMElab1This will launch a graphical interface for modifying your database. Select the Tables tab on the left, and then click on New. This will bring up a window that allows you to create a new table. Enter the Movie database from p 71 (second edition) or p 99 (first edition) of the textbook. You will first need to enter the name of the table (movie), then the attributes, or fields, choosing the type of the field as you go. Choose char for the type of filmType When you are done entering fields, click the create button in the bottom right hand corner.
Now that the table has been created, click on the Open button to open it, and enter the rows from p 99 into your table. When you're done, close the table.
Choose the Queries tab and click on the New button. This will launch an SQL window. Type in the following query:
SELECT titleExecute the query, and you should see the titles of the movies in the table.
FROM "Movie"
You can also build queries using the Query Builder, which can be accessed by choosing the Visual Designer button from the new query window. The query builder allows you to select the table (you need to highlight it with the mouse), and drag the fields you are interested to the grid on the bottom. You can show and execute the corresponding SQL command with the buttons on top. Build the simple query above, using the query builder. How does the SQL it generates differ from that you typed above?
Write queries that will do the following:
As the course progresses you will be building a substantial database application for a real-world scenario of your choosing. You will design a relational schema for the database, and you will create an actual database using a relational database management system. You will populate the database with sample data, write interactive queries and modifications on the database, and develop user-friendly tools for manipulating the database. For ideas on possible databases, see the book's webpage.
Your first step is to identify the domain you would like to manage with your database, and to construct an entity-relationship diagram for the data. Pick an application that you will enjoy working with, since you'll be stuck with it for the rest of the semester.
Try to pick an application that is relatively substantial, but not too enormous. For example, when expressed in the entity-relationship model, you might want your design to have in the range of five or so entity sets, and a similar number of relationships. Note that this is a ballpark figure only! You should certainly include different kinds of relationships (e.g., many-one, many-many) and different kinds of data (strings, integers, etc.), but your application is not required to use advanced features, such as subclassing, multiway relationships, or weak entity sets, if they are not appropriate for your application.
The following are part of the project and are due on Thursday, 20 February in lab. See the project page for more details.
Remember to pick up any files you sent to the printer and to take any personal belongings. It is difficult to get back into the lab later (since it's locked when not in use), so, it's worth making sure you haven't forgotten anything.