Database Final Exam - p3-1
Database Final Exam - p3-1
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.
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.
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.