Bạn cũng có thể cài đặt một máy chủ X sử dụng của Apple Get hệ điều hành MacOS X phần mềm . liên kết từ menu Apple của bạn. Máy chủ X của Apple được gọi là X11 cho Mac OS, và tại văn bản này, là một phiên bản Beta công cộng. Apple thực hiện của X Windows cũng dựa trên XFree86. | 18 DEVELOP UNIX APPLICATIONS You can get help during your psql session by typing . When you enter this command a list of slash commands such as l for creating a list of your databases appears. You can use the h command to get help on a particular command. For example typing h select describes the syntax and use of the select command. I To exit your psql session type q. SQL syntax provided by the help function will display optional portions of a command inside square brackets. If you type h modify for example you will notice that the word ONLY appears within square brackets - ONLY . This part of the command is therefore optional. Similarly WHERE condition means that you can optionally specify a condition such as where areacode 415. L Type usr local pgsql bin initdb -D usr local pgsql data and press Return. Type nohup usr local pgsql bin postmaster -D usr local pgsql data dev null 2 1 dev null and press Return. Your database service Type createdb testdb and press Return. Your database is created. Type psql testdb and press Return. starts. You connect to the database. 311 UNIX FOR MAC _ J_fl_ WRITE SQL COMMANDS You can issue SQL commands to your PostgreSQL database. To use all of the features of your database software you need to learn a number of SQL commands. In particular you need to learn how to create tables insert and remove records from these tables and run queries to extract information from these tables. The command for creating a table is create table tablename. When you define a table you need to specify the number of columns you want to add. For example the SQL command for adding a book table to the database may look like this create table books author varchar 32 title varchar 64 publisher varchar 16 pubyear int IsbN varchar 13 You define each column in the table as having a particular type. Most of these types are character fields of a specified length. After you define a table you can add records to it. You can do this one record at a time or