CSE 3901 Midterm 1 Exam ||Verified Exam!!! Most
Recent Exam 2026 Actual Complete Real Exam
Questions And Correct Answers (Verified Answers)
Already Graded A+ | Newest Exam!!!
Explain model view controller - Answer-Model
The data (ie state)
Methods for accessing and modifying state
View
Renders contents of model for user
When model changes, view must be
updated
Controller
Translates user actions (ie interactions
with view) into operations on the model
Example user actions: button clicks, menu
selections
Who writes schema.rb and what is the golden rule? -
Answer-It is generated! (tool called rake)
Golden rule: Never edit schema.rb directly
, 2|Page
Instead, write a migration
What is a migration? - Answer-A migration is Ruby code (a
class) that
represents a change in schema
Create new tables (including column
names and column types)
Modify existing tables (adding/removing
columns, or changing associations)
Delete ("drop") existing tables
What is the difference between a migration and a
schema? - Answer-Schema is a version of the database. It
is regenerated every time you do a migration. Every
change in schema means writing a
migration
What is important about migrations for table edits? -
Answer-The name is meaningful (starts with Add or
Remove). ie $ rails g migration AddNickNameToStudent
nick:string