Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
opendb [2017/02/13 19:26]
glaroc [Exercise]
opendb [2019/04/30 19:39] (current)
qcbs [Importing a table in LibreOffice Base from Calc]
Line 2: Line 2:
  
  
-Workshop offered by Guillaume Larocque ([email protected]),​ research professional at the [[http://​qcbs.ca|Quebec Centre for Biodiversity Science]] ​on February 7 and 14, 2017+Workshop offered by Guillaume Larocque ([email protected]),​ research professional at the [[http://​qcbs.ca|Quebec Centre for Biodiversity Science]]. ​
  
  
Line 45: Line 45:
 ===== Accessing PSQL ===== ===== Accessing PSQL =====
 **On Windows and Mac**: ​ **On Windows and Mac**: ​
-  * Find PostgreSQL ​9.X in the Start menu and click on "SQL shell (psql)"​+  * Find PostgreSQL ​10.X in the Start menu and click on "SQL shell (psql)"​
   * In the shell, accept the default values by pressing enter for the username and server name and type the proper Postgres password (chosen above). Note that you will not see anything while typing the password. This is normal. ​   * In the shell, accept the default values by pressing enter for the username and server name and type the proper Postgres password (chosen above). Note that you will not see anything while typing the password. This is normal. ​
  
Line 59: Line 59:
 </​file>​ </​file>​
   - Edit data/​pg_hba.conf and change '​md5'​ to '​trust'​ in the '​local'​ and '​host'​ lines   - Edit data/​pg_hba.conf and change '​md5'​ to '​trust'​ in the '​local'​ and '​host'​ lines
-  - To do this on a mac, open a terminal and type 'nano /​Library/​PostgreSQL/​9.5/​data/​pg_hba.conf'​. Make the necessary changes, hit CTRL-O and then CTRL-X.+  - To do this on a mac, open a terminal and type 'nano /​Library/​PostgreSQL/​10/​data/​pg_hba.conf'​. Make the necessary changes, hit CTRL-O and then CTRL-X.
   - Start the daemon   - Start the daemon
 <​file>​ <​file>​
-sudo launchctl load /​Library/​LaunchDaemons/​com.edb.launchd.postgresql-9.5.plist+sudo launchctl load /​Library/​LaunchDaemons/​com.edb.launchd.postgresql-10.plist
 </​file>​ </​file>​
  
Line 354: Line 354:
   * Select the entire worksheet with ctrl-a;   * Select the entire worksheet with ctrl-a;
   * Open LibreOffice Base and go to Edit...paste. Call the new table public.species_acro. Select '​Definition and data'. Select to use first line as column names. Do not create a primary key at this point.   * Open LibreOffice Base and go to Edit...paste. Call the new table public.species_acro. Select '​Definition and data'. Select to use first line as column names. Do not create a primary key at this point.
-  * Follow the wizard... Move all columns to the right to select them. Then, specify the proper data format (verify the types of attributes in the table) for the other columns. Right click on the column named 'unique_id' and select '​Primary Key'. Set the unique_id as int [int4], full_name as text [varchar] with 200 characters and species_id as text [varchar] with 30 characters. ​+  * Follow the wizard... Move all columns to the right to select them. Then, specify the proper data format (verify the types of attributes in the table) for the other columns. Right click on the column named 'species_id' and select '​Primary Key'. Set the unique_id as int [int4], full_name as text [varchar] with 200 characters and species_id as text [varchar] with 30 characters. ​
  
  
Line 673: Line 673:
   * Those table will then be linked to PostgreSQL and you can edit then as you would with other Access tables. ​   * Those table will then be linked to PostgreSQL and you can edit then as you would with other Access tables. ​
  
-====== Basic concepts for the creation of web forms======+========= Basic concepts for the creation of web forms =========
  
   * [[https://​prezi.com/​xd-ueiomgbj-/​basic-concepts-for-the-creation-of-web-forms/​|Access the Prezi presentation here]]   * [[https://​prezi.com/​xd-ueiomgbj-/​basic-concepts-for-the-creation-of-web-forms/​|Access the Prezi presentation here]]
Line 760: Line 760:
 [[http://​www.w3schools.com/​cssref/​|CSS reference]] [[http://​www.w3schools.com/​cssref/​|CSS reference]]
  
-On peut donner un "​id" ​à n'​importe quel élément ​html. Important: il ne peut y avoir qu'​un ​id unique par élément+You can give an "​id" ​to any html element, but there can only one element per id
 <file html> <file html>
 <input type="​text"​ name="​fieldname"​ id="​fieldid">​ <input type="​text"​ name="​fieldname"​ id="​fieldid">​
Line 945: Line 945:
 From within R: From within R:
 On first use only: On first use only:
-<file | install ​RMySQL ​package>+<file | install ​RPostgreSQL ​package>
 install.packages('​RPostgreSQL'​) install.packages('​RPostgreSQL'​)
 </​file>​ </​file>​