0% found this document useful (0 votes)
2 views2 pages

Database Final Exam - p3-1

The document outlines a final exam for a Database course, covering various topics such as stored procedures, database design methods, database auditing, VPD vs SQL injection, and differences between data warehouses and OLTP databases. It includes questions about ETL processes, fact and dimension tables, performance improvement strategies, and the advantages of relational databases versus SQL. Additionally, it discusses the creation of tables in SQL and the implicit creation of collections in MongoDB.

Uploaded by

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

Database Final Exam - p3-1

The document outlines a final exam for a Database course, covering various topics such as stored procedures, database design methods, database auditing, VPD vs SQL injection, and differences between data warehouses and OLTP databases. It includes questions about ETL processes, fact and dimension tables, performance improvement strategies, and the advantages of relational databases versus SQL. Additionally, it discusses the creation of tables in SQL and the implicit creation of collections in MongoDB.

Uploaded by

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

Database Final Exam – Part III – Spring 2025

Short answers: one paragraph to half a page answers.

1. Describe an advantage of a stored procedure over a trigger ? What is the advantage of a trigger
over a stored procedure ? Some advantages of a stored procedure over a trigger are, enhances
performance, ensures security and enables code reuse. Some advantages of a trigger over a
stored procedure is it Enforces data integrity, automates actions and ensures business rule
consistency.

2. Describe the three different methods of designing a Database. Which one consists of induction?
The three different methods of designing a Database are Top-Down Design, Bottom-Up Design
and Inside-Out. The one that consist of induction is Bottom Up Design.

3. You have been hired by your rich uncle to do database auditing. You have little knowledge of
database and cybersecurity. List a few things that you can do that were described in class. Some
things you can do are, Check for Default or Weak Passwords, Check User accounts and
permissions and Backup and do a recovery check.

4. How is VPD different than SQL injection and how is it similar ?


Differences: VPD: Security feature to restrict data access per user. SQL: Attack technique to
bypass security and access or manipulate data. Similar: VPD and SQL injection both modify or
influence SQL queries—VPD does it for protection, injection does it to attack.
5. How is a Datawarehouse different than a regular OLTP database ? OLTP main goal is to Handle
real-time transactions (e.g., insert, update, delete). SQL main goal is to Support data analysis,
reporting, and decision-making

6. What is the timeframe that is recommended for doing ETL ? I would Run ETL once daily during
off-peak hours, typically late night to early morning, to avoid performance impact on operational
systems.

7. What are the attributes that a fact table typically has ? The attributes a fact table typically has
are measures and foreign keys.

8. When loading data into the data warehouse, you can do an Incremental Load or a Full load.
Which one is recommended for a Fact table and which is recommended for a dimension table ?
Explain why ? For a fact table a Incremental Load is recommended because Fact tables grow
continuously, new transactions are added, but existing rows are rarely updated. For a dimension
table a Full load is recommended because Dimension tables are relatively small and store
descriptive information (e.g., customer names, product categories).

9. In both Datawarehouse and datamining, we can use a programming language such as python or
a tool such as SSIS or SSAS. Explain the advantages of each. Python: Write custom logic,
transformations, and algorithms exactly as needed and it is Great for handling complex data
workflows or non-standard data sources. SSIS: Drag-and-drop interface makes it easy for users
with less programming knowledge. SSAS: Supports algorithms like decision trees, clustering, etc.

10. Describe the commands or actions that:

a) Explicitly creates locks LOCK TABLE table_name IN [mode];


b) Implicitly creates locks SELECT, INSERT, UPDATE, or DELETE inside a transaction
c) Explicitly releases locs (two) COMMIT;
d) Explicitly releases locks ROLLBACK;

11. Describe three ways to improve performance of your system. Indexing, Query Optimization and
Partitioning Tables.

12. Why is it recommended to start with the applications when you want to increase both
performance and security ? Applications Are the Primary Attack Surface, Most users and
attackers interact with your system through the application layer. Applications Control System
Behavior, Applications dictate how data is queried, updated, and processed.

13. Explain the advantages and disadvantages of Relational Databases versus SQL. Advantages:
Rational Databases. Structured and Organized and Data Integrity. SQL. Standardized Language
and Powerful Query Capabilities. Disadvantages: Relational. Less Ideal for Big Data or
Unstructured Data. SQL. Limited for Complex Programming Logic

14. Creating tables is similar to which command in a programming language ? Creating tables in SQL
is similar to using the class or struct

15. Why do we mean when we say that in Mongodb, collections (equivalent to tables) are implicitly
created ? You don’t have to manually define or create a collection before inserting data into it.

You might also like