Posts

Showing posts with the label PostgreSQL

PostgreSQL Commands

  Select Statement   select * from users;  - Selects all column select username from users;  - Selects only username column    select * from users limit 10;  - Selects only first 10 records Here column name is case insensitive  e.g username = USERNAME Columns name with space in between must be same as what is stored in database  e.g.  “User Name” is not equal to “user name”. You should enter “User Name” in query Where Filter   select * from users where country=’europe’;  - Selects all column from users table whose country column values is europe select * from users where country=’europe’ limit 10; - Selects first 10 records from users table whose country column values is europe select * from users where “Annual Salary” > 10000; Use logical operator on number columns to perform numeric operations select * from users where Extract(Year from to_date(birthdate, “MM/DD/YYYY”))=2015 limit 10; Selects first 10 users whose birt...

Introduction to PostgreSQL

Image
  Introduction to PostgreSQL CREATOR: Amruta Ashish Pednekar What is PostgresQL ? Database For   Storing Data Database system which stores data into tables for easy access Install PostgresQL  Go to https://www.postgresql.org/download/ Select your opening system family Download installer Click on downloaded installer and run as administrator Enter admin password. It will start installation. Click on NEXT button after every step It will ask you for a password for database superuser . Enter and note is somewhere for future use Check below option Finish installation Starting PGAdmin  Go to path where you installed PostgreSQL Go to <version> -> PGAdmin -> bin Open pgAdmin4 Set a master password for pgAdmin Connect to server Go to the left panel. Click on to servers Select server . Its PostgreSQL<version> Enter the same password you set while PostgreSQL installation Once you are connected to server, you can see other dropdowns like Tablespaces If you fac...

Rails App to schedule reminders & email notifications

Image
Scheduled Reminder DEVELOPER: Amruta Ashish Pednekar Git Repository : https://github.com/amrutapednekar/ScheduledReminders OVERVIEW & PURPOSE Build a small, simple Ruby on Rails application that sends monthly scheduled reminders to users Overall requirements A user should be able to register with an email and password After signing in, the user should see a list of their existing reminders The user should be able to create a new reminder (see below for details) Once a month, on a configurable day and time, the application should send the user an email with the reminder title and text The user should be able to delete existing reminders There should be basic tests in place for the core functionality (ideally in RSpec, but alternatives are fine if you're more comfortable with them) Reminder Configuration Requirements: The user should be able to add a title (i.e. subject line) The user should be able to add body text The user should be able to select a time of day when the email w...