Let's say I have a model and a table called 'people'.
I run this code while using the Sqlite3 adapter:
People.create(name: "jim", age: 23)
This creates a new person:
1|jim|23|2013-10-15 16:59:24.708963|2013-10-15 16:59:24.708963
Now, if I was using PostgreSQL instead of Sqlite3, the process would be the identical, right? To create another person I'd write:
People.create(name: "alice", age: 32)
How are they the same? Is this because they're going through 'activerecord'?
Would I be right in thinking that active record is simply a library that allows for easy CRUD with a database? Does it also know how to interact with different databases thanks to your settings in database.yml
?
If an application works with sqlite3, will it work with any database, providing a future developer of the application installs the database and configures database.yml correctly?