CSE 3901 FINAL – RAILS
COMPREHENSIVE STUDY GUIDE 2026
FULL QUESTIONS AND SOLUTIONS
GRADED A+
◍ STATIC SITES SECTION.
Answer: ---
◍ What is static site generation?.
Answer: Using a program to produce HTML pages (kind of like compiling
programs)Middleman
◍ what are the source files used in SSG?.
Answer: .md.erb.scss
◍ Guideline 1: Do not combine attributes from ____ into a ____.
Answer: Do not combine attributes from multiple entity types and
relationship types into a single relation
◍ What is Middleman?.
Answer: A ruby Gemthe project is its own directorylots of subdirectories for
css, images, etcCompile the source files like a programcan then copy to any
location
◍ What are the three benefits of using a program for Static Site Generation?.
Answer: 1. Code reuse and single point of control (visual identity)2.
Authoring of content in a language that is more human-friendly (improved
syntax)3. Parameterized generation of markup and content (content
generation)
◍ Describe Visual Identity (code reuse/single POC) Motivation.
Answer: -Having common headers and footers and making the whole
, website have a base design for every page-duplicated code ruins single
POC-Solution: putting common HTML in one file (a partial) and every page
includes it
◍ Guideline 2: Design base relation schemas so that:1) No ____ exists in
tuples2) No ____ will occur.
Answer: 1) No redundant information exists in tuples2) No update
anomalies will occur
◍ What is ERb?.
Answer: Embedded Ruby-things like <% code %> <%= expr %> and <%#
text %>
◍ What are the three types of update anomalies?.
Answer: Insertion, deletion, modification
◍ How to generate a site.
Answer: save source files as html.erb >> bundle exec middleman buildthis
then makes them .html
◍ Define a functional dependency:1) A function dependency is between
____2) Specifies a ____ on the possible tuples that can ____3) For any two
tuples t1 and t2 in r that have t1[X] = t2[X], they must ____.
Answer: 1) Two sets of attributes X and Y that are subsets of R2) Specifies a
constraint on the possible tuples that can form a relation state r of R3) They
must also have t1[Y] = t2[Y]
◍ what is a partial.
Answer: a document fragment included in other documents-include in
template as <%= partial "navigation" %>
◍ X --> Y means1) Y ____2) X____.
Answer: 1) Y is functionally dependent on X2) X functionally determines Y
◍ what is special about naming a partial?.
Answer: they always start with _ and end in .erb still (no html)
◍ Define full functional dependency in english between sets of attributes X
, and Y.
Answer: X -- Y and no subset of X can be claimed to also functionally
determine Y; X and only the complete X functionally determines Y
◍ Define 1NF.
Answer: All domain values in R are atomic
◍ Define 2NF.
Answer: 1) R is in 1NF and every non-key attribute is fully dependent on the
key2) Every nonprime attribute is not partially dependent on any candidate
key3) EVERY NON-KEY ATTRIBUTE IS FULLY DEPENDENT ON
THE KEY
◍ Define 3NF.
Answer: R is 2NF and every non-key attribute is non-transitively dependent
on the key
◍ Techniques to achieve 1NF:1) Remove ____2) Propagate ____.
Answer: 1) Remove nested relation and non-atomic attributes into a new
relation2) Propagate the primary key into it
◍ How to customize arguments with a partial.
Answer: in the normal page when you call the partial:<%= partial "banner",
:locals => { :name => "Syllabus", :amount => 34 } %>in the partial
file:<h3> ,%= name %> </h3><p> Costs <%= "$#{amount}.00" %></p>
◍ What is Layout.
Answer: It is a file that can make a consistent structure across every page in
a website
◍ 2NF is based on the concept of ____.
Answer: Full functional dependency
◍ How do you label where there's page specific stuff in Layout.erb?.
Answer: <%= yield =>
◍ Define prime attribute.
Answer: A member of some candidate key of R
COMPREHENSIVE STUDY GUIDE 2026
FULL QUESTIONS AND SOLUTIONS
GRADED A+
◍ STATIC SITES SECTION.
Answer: ---
◍ What is static site generation?.
Answer: Using a program to produce HTML pages (kind of like compiling
programs)Middleman
◍ what are the source files used in SSG?.
Answer: .md.erb.scss
◍ Guideline 1: Do not combine attributes from ____ into a ____.
Answer: Do not combine attributes from multiple entity types and
relationship types into a single relation
◍ What is Middleman?.
Answer: A ruby Gemthe project is its own directorylots of subdirectories for
css, images, etcCompile the source files like a programcan then copy to any
location
◍ What are the three benefits of using a program for Static Site Generation?.
Answer: 1. Code reuse and single point of control (visual identity)2.
Authoring of content in a language that is more human-friendly (improved
syntax)3. Parameterized generation of markup and content (content
generation)
◍ Describe Visual Identity (code reuse/single POC) Motivation.
Answer: -Having common headers and footers and making the whole
, website have a base design for every page-duplicated code ruins single
POC-Solution: putting common HTML in one file (a partial) and every page
includes it
◍ Guideline 2: Design base relation schemas so that:1) No ____ exists in
tuples2) No ____ will occur.
Answer: 1) No redundant information exists in tuples2) No update
anomalies will occur
◍ What is ERb?.
Answer: Embedded Ruby-things like <% code %> <%= expr %> and <%#
text %>
◍ What are the three types of update anomalies?.
Answer: Insertion, deletion, modification
◍ How to generate a site.
Answer: save source files as html.erb >> bundle exec middleman buildthis
then makes them .html
◍ Define a functional dependency:1) A function dependency is between
____2) Specifies a ____ on the possible tuples that can ____3) For any two
tuples t1 and t2 in r that have t1[X] = t2[X], they must ____.
Answer: 1) Two sets of attributes X and Y that are subsets of R2) Specifies a
constraint on the possible tuples that can form a relation state r of R3) They
must also have t1[Y] = t2[Y]
◍ what is a partial.
Answer: a document fragment included in other documents-include in
template as <%= partial "navigation" %>
◍ X --> Y means1) Y ____2) X____.
Answer: 1) Y is functionally dependent on X2) X functionally determines Y
◍ what is special about naming a partial?.
Answer: they always start with _ and end in .erb still (no html)
◍ Define full functional dependency in english between sets of attributes X
, and Y.
Answer: X -- Y and no subset of X can be claimed to also functionally
determine Y; X and only the complete X functionally determines Y
◍ Define 1NF.
Answer: All domain values in R are atomic
◍ Define 2NF.
Answer: 1) R is in 1NF and every non-key attribute is fully dependent on the
key2) Every nonprime attribute is not partially dependent on any candidate
key3) EVERY NON-KEY ATTRIBUTE IS FULLY DEPENDENT ON
THE KEY
◍ Define 3NF.
Answer: R is 2NF and every non-key attribute is non-transitively dependent
on the key
◍ Techniques to achieve 1NF:1) Remove ____2) Propagate ____.
Answer: 1) Remove nested relation and non-atomic attributes into a new
relation2) Propagate the primary key into it
◍ How to customize arguments with a partial.
Answer: in the normal page when you call the partial:<%= partial "banner",
:locals => { :name => "Syllabus", :amount => 34 } %>in the partial
file:<h3> ,%= name %> </h3><p> Costs <%= "$#{amount}.00" %></p>
◍ What is Layout.
Answer: It is a file that can make a consistent structure across every page in
a website
◍ 2NF is based on the concept of ____.
Answer: Full functional dependency
◍ How do you label where there's page specific stuff in Layout.erb?.
Answer: <%= yield =>
◍ Define prime attribute.
Answer: A member of some candidate key of R