0% found this document useful (0 votes)
2K views12 pages

CS406 Midterm

Uploaded by

faizanali107f
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views12 pages

CS406 Midterm

Uploaded by

faizanali107f
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

CS406 (Weeks 1 to 6) based on the syllabus content:

Week 1: Course Introduction

1. What is the primary goal of this course?

o A) To understand programming languages

o B) To create traditional websites

o C) To develop and manage database-driven web applications

o D) To master SEO techniques


Answer: C

2. Which of the following is a primary text for this course?

o A) "Database-Driven Web Sites" by Jesse Feiler

o B) "Learn Python the Hard Way" by Zed Shaw

o C) "SQL for Beginners" by Matt Doyle

o D) "Modern Database Systems" by Loren Baker


Answer: A

3. Which layer is NOT part of a database-driven web application?

o A) Application logic layer

o B) Database layer

o C) Network infrastructure layer

o D) Browser layer
Answer: C

4. What is the role of a database schema?

o A) Defines database structure and relationships

o B) Stores the physical data of the database

o C) Optimizes database performance

o D) Establishes user authentication


Answer: A

5. What is the primary difference between a traditional and database-driven website?

o A) Database-driven websites interact dynamically with user data

o B) Traditional websites require databases for static data

o C) Traditional websites are built using JavaScript only

o D) Database-driven websites have no user interaction


Answer: A
6. Who is considered the inventor of the World Wide Web?

o A) Alan Turing

o B) Tim Berners-Lee

o C) John von Neumann

o D) Steve Jobs
Answer: B

7. Which protocol does the World Wide Web primarily use?

o A) FTP

o B) HTTP

o C) SMTP

o D) POP3
Answer: B

8. What is the main advantage of database-driven websites?

o A) Low development cost

o B) Easy scalability and maintenance

o C) Static content delivery

o D) High SEO ranking


Answer: B

9. What is the external level in data abstraction?

o A) Physical data storage

o B) User-specific views of the database

o C) Entire database structure

o D) Database connection logic


Answer: B

10. What type of software is a DBMS?

o A) Operating system

o B) Database optimization tool

o C) Software for managing databases

o D) Web server application


Answer: C

Week 2: Web Application vs. Website

1. What is a characteristic of a website?


o A) Focus on static content delivery

o B) Requires user authentication

o C) Allows dynamic data manipulation

o D) Performs high-level processing


Answer: A

2. How does a web application differ from a website?

o A) Websites perform automated tasks

o B) Web applications allow user interactions with data

o C) Websites require complex processing

o D) Web applications are marketing-focused


Answer: B

3. Which of the following is NOT a feature of a website?

o A) Data presentation

o B) User authentication

o C) Simplified navigation

o D) Brand communication
Answer: B

4. Web applications are also referred to as:

o A) Static websites

o B) Web portals

o C) Offline tools

o D) Presentation layers
Answer: B

5. What is a key feature of websites compared to web applications?

o A) Marketing-focused design

o B) High server load

o C) Task automation

o D) Data analytics
Answer: A

6. Which of the following statements about web applications is true?

o A) They are primarily used for branding

o B) They generally require authentication

o C) They lack data manipulation capabilities


o D) They are simpler to code than websites
Answer: B

7. What is a disadvantage of websites compared to web applications?

o A) Require less server processing power

o B) Cannot manipulate data dynamically

o C) Are not accessible via browsers

o D) Need complex authentication systems


Answer: B

8. Web applications are more resource-intensive because:

o A) They handle complex tasks

o B) They lack data processing capabilities

o C) They are static in nature

o D) They do not use databases


Answer: A

9. Which of the following is true for a web application?

o A) No authentication required

o B) Less focused on marketing

o C) Easier to build than a website

o D) Requires no user interaction


Answer: B

10. Which element is specific to web applications but not websites?

o A) Static navigation

o B) User data validation

o C) Branding strategies

o D) Content marketing
Answer: B

Week 3: Building E-Commerce SMB

1. What is the first step in launching an online presence?

o A) Register a domain name

o B) Optimize for SEO

o C) Select a hosting provider


o D) Design the website
Answer: A

2. Which of the following is NOT a benefit of being online?

o A) Building credibility

o B) Generating leads

o C) Simplifying offline customer service

o D) Connecting with customers


Answer: C

3. What does SEO stand for?

o A) Simplified E-commerce Operations

o B) Search Engine Optimization

o C) Social Engagement Opportunities

o D) Scalable Enterprise Online


Answer: B

4. Which is NOT a characteristic of a perfect domain name?

o A) Short and memorable

o B) Contains special characters

o C) Easy to spell

o D) Relevant to the business


Answer: B

5. Why is mobile-readiness important for websites?

o A) Mobile devices dominate web traffic

o B) It reduces server load

o C) Mobile sites are cheaper to maintain

o D) Mobile users avoid online shopping


Answer: A

6. Which of the following is NOT an SEO best practice?

o A) Use of keywords

o B) Optimizing page load time

o C) Hiding metadata

o D) Building backlinks
Answer: C

7. What is the purpose of an "About Us" page?


o A) To display product pricing

o B) To introduce the brand and its values

o C) To collect customer feedback

o D) To handle user authentication


Answer: B

8. Which social media platform is best for business networking?

o A) Instagram

o B) Facebook

o C) LinkedIn

o D) Twitter
Answer: C

9. What is the main goal of content marketing?

o A) Reducing website costs

o B) Increasing lead generation

o C) Simplifying navigation

o D) Automating customer responses


Answer: B

10. What is the purpose of image optimization in SEO?

o A) Increase image resolution

o B) Improve page load speed

o C) Enhance browser compatibility

o D) Display larger image sizes


Answer: B

Let me know if you'd like Weeks 4 to 6 now or later!

Week 4: How Databases Work on the Web

1. Which of the following is NOT a feature of the World Wide Web (WWW)?

o A) Manages large amounts of data

o B) Allows for dynamic data manipulation

o C) Requires manual updates for all data changes


o D) Supports tools for data selection and display
Answer: C

2. What protocol is primarily used to transfer resources on the web?

o A) FTP

o B) HTTP

o C) SMTP

o D) POP3
Answer: B

3. Which component is NOT part of a web database gateway?

o A) Application logic layer

o B) Database connection layer

o C) Browser layer

o D) Network infrastructure layer


Answer: D

4. What is a stateless protocol in the context of web databases?

o A) A protocol that maintains continuous connection with the server

o B) A protocol that closes the connection after each transaction

o C) A protocol used exclusively for security purposes

o D) A protocol that encrypts all web traffic


Answer: B

5. Which of the following technologies connects databases to web servers?

o A) TCP/IP

o B) Database API libraries

o C) Content Delivery Network

o D) Proxy servers
Answer: B

6. What is a benefit of using CGI for web database programming?

o A) Supports dynamic data changes

o B) Independent of programming language and web server

o C) Requires no middle-layer processing

o D) Provides the highest performance


Answer: B

7. Why are proxy servers used in web applications?


o A) To encrypt all web traffic

o B) To store and retrieve user credentials

o C) To act as intermediaries between browsers and servers

o D) To improve database performance


Answer: C

8. Which of the following best describes "firewalls" in web applications?

o A) They prevent unauthorized access to a private network

o B) They enable faster network speeds

o C) They convert HTTP traffic into HTTPS

o D) They store database connection credentials


Answer: A

9. What is a significant difference between HTTP and HTTPS?

o A) HTTPS operates without encryption

o B) HTTPS uses SSL/TLS for secure communication

o C) HTTP supports only static websites

o D) HTTP is faster than HTTPS for secure transactions


Answer: B

10. What is the primary disadvantage of using database API libraries?

o A) They are language-dependent

o B) They reduce server efficiency

o C) They require high programming complexity

o D) They limit the number of database connections


Answer: C

Week 5: Database-Driven Websites

1. What is the key function of the database connection layer in a web application?

o A) To display dynamic content

o B) To process user input

o C) To facilitate communication between the application and the database

o D) To optimize SEO performance


Answer: C

2. What is the main characteristic of a 3-tier client-server architecture?

o A) All processes are handled by a single server


o B) It separates presentation, logic, and data layers

o C) The application runs without a database

o D) It requires no user interaction


Answer: B

3. Which of the following is NOT a layer in a database-driven web application?

o A) Browser layer

o B) Database layer

o C) Content optimization layer

o D) Application logic layer


Answer: C

4. What is an advantage of using web database applications?

o A) They reduce server load

o B) They allow global access to data

o C) They eliminate the need for browsers

o D) They operate without database gateways


Answer: B

5. Which of these is NOT true for web database gateways?

o A) They link stateful databases with stateless HTTP

o B) They act as intermediaries between the web and DBMS

o C) They ensure encryption of all data

o D) They can be implemented client-side or server-side


Answer: C

6. What is one drawback of stateless HTTP protocols in web databases?

o A) They require continuous server connections

o B) They maintain previous transaction details

o C) They incur overhead with each database request

o D) They do not support secure transactions


Answer: C

7. What is the primary role of a digital certificate in web security?

o A) To encrypt data transmission

o B) To verify the authenticity of the sender

o C) To store user passwords securely


o D) To act as a proxy server
Answer: B

8. What is a common feature of 2-tier client-server architecture?

o A) User interface and database reside on the same machine

o B) It separates the browser and server layers

o C) It uses a middleware layer for communication

o D) It eliminates the need for client-side scripting


Answer: A

9. What is the primary benefit of using encryption protocols like SSL in web applications?

o A) Increased database query speed

o B) Secure data transmission between client and server

o C) Reduction in server load

o D) Simplified database integration


Answer: B

10. What is the key difference between server-side and client-side solutions for database
connectivity?

o A) Server-side solutions offer faster processing

o B) Client-side solutions are more secure

o C) Server-side solutions support multiple transactions per connection

o D) Client-side solutions eliminate the need for HTTP


Answer: C

Week 6: Understanding Database Schemas

1. What is a database schema?

o A) A set of rules for coding a database application

o B) A visual or logical representation of database structure

o C) A method for optimizing query performance

o D) A layer for encrypting database connections


Answer: B

2. What is the main focus of conceptual schemas in database design?

o A) Physical data storage

o B) Application-specific views

o C) Organization's informational needs


o D) User authentication
Answer: C

3. Which of the following is NOT a level of data abstraction in a database?

o A) External

o B) Internal

o C) Logical

o D) Procedural
Answer: D

4. What type of attributes represent properties derived from other attributes?

o A) Simple attributes

o B) Composite attributes

o C) Derived attributes

o D) Multi-valued attributes
Answer: C

5. Which of the following is NOT a characteristic of relational databases?

o A) Use of tables for data storage

o B) Support for hierarchical structures

o C) Defined relationships between tables

o D) Enforcement of integrity constraints


Answer: B

6. What is the purpose of data abstraction in databases?

o A) To improve query performance

o B) To hide complex storage details from users

o C) To ensure schema consistency

o D) To encrypt sensitive data


Answer: B

7. What does the external level of data abstraction focus on?

o A) Database indexing and storage

o B) User-specific views of the database

o C) Logical structure of the database

o D) Application server connections


Answer: B

8. Which of the following represents a single occurrence of an entity in a database?


o A) Attribute

o B) Record

o C) Field

o D) View
Answer: B

9. Which type of attribute cannot be broken down further?

o A) Composite attribute

o B) Simple attribute

o C) Multi-valued attribute

o D) Derived attribute
Answer: B

10. What is an example of a multi-valued attribute?

o A) A person’s name

o B) A person’s multiple phone numbers

o C) A single unique identifier

o D) A derived value like age


Answer: B

Let me know if you need further assistance!

You might also like