Cosi 165a - IT Entrepreneurship
Rails Database Mechanics
Rails DB Mechanics
ActiveRecord
Layer in RoR which is the connection between the rails application and the underlying database
For advanced designs, there are options other than Activerecord
Naming
Model.rb file is named singular, e.g. User
Corresponding db table is plural and lower case, e.g. users
Correspondences
Each instance of the class (e.g. User) corresponds to a single record in the dabase
When a query returns a bunch of records, you get a collection of instances of the class
(this is classic Active Record model)
Attributes
Rails will automagically create the methods to access each field of the record in the database
Different database ‘servers’
Sqllite - local database, no need for a server
MySql - Standard industrial strength database, free
Postgress - Becoming very popular with Rails community
Migration
Rails Guide: Migrations
rails generate model -h
rails generate migration -h
Datatypes supported by Rails
DB datatypes for Rails 4
Queries and other ways to access the database
Validations
Rails Validations
Tools and notes
Check out
MesaSQLite
Handy Rake Info:
Rake “tasks” (commands)
Was this helpful!?
yes
/
no
Welcome
Term Overview
List of lectures
Guide to this site
Entrepreneurial Projects
Lectures
Lean Startup Immersion
Welcome!!
Intro to Lean Startup
Hypotheses/Assumptions
Minimum Viable Product
Review and practice
Metrics & Growth Engine
Pivot and Grow
Pilot Project Conclusion
Frame 1
Term project Kickoff
Market segments/Value Prop
Quant and Qual Testing
Mockups and Prototypes
Business Models
Frame 1 Conclusion
Frame 2
UI and UX Basics
User Experience Flow
Product Architecture
Client and the server data models
Frame 2 Review
Frame 3
Pricing Models
Finance for Geeks
Growth Hacking
Real World Survival Kit
Intellectual Property [IANAL]
Marketing for Entrepreneurs
Pizza Party?!
Background
Learning Objectives
Homework info
FAQ for Pito Salas
Grading
Teachers
Lexicon
Interesting links
Credits and acknowledgements
Catalog of Topics