0% found this document useful (0 votes)
23 views

EXAM 3 Study Guide Answers

Uploaded by

janna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

EXAM 3 Study Guide Answers

Uploaded by

janna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

1. Type of databases.

a. By Functional.
Analytical databases, also referred to as On-Line analytical processing, are those used to keep
track of statistics. (read only access to analyze the data).
Operational database, also referred to as On-Line transactional processing, lets you change and
manipulate the data in database.
b. By Data Model
Flat file database model
Data is stored in numerous files.
No linkage between files so repetition of information in different files’
Relational database model
Data can be stored in different tables/database.
The tables/databases can be connected using keys.
Object oriented database model.
Stores not only text, but also sounds, images and all sorts of media clips.
Not only SQL is an umbrella term for any alternative system to traditional SQL databases. In
NoSQL management system, it indicated any database that doesn’t use a rown and columns
table structure used with RDBMS.

2. What is a data model?


A collection of concepts for describing data.
A schema is a description of a particular collection of data, using the given data model.
The relational model of data is the most widely used model today.
Main concept: relation, basically a table with rows and columns.
Every relation has a schema, which describes the columns or fields.

3. Differences between TRUNCATE table and DROP table.


The DROP command is used to remove table structure and its contents. Whereas the TRUNCATE
command is used to delete all the rows/records from the table. It will not remove the table structure.

4. What is SQL injection attack?


A common attack vector that uses malicious SQL code for backend database manipulation to access
information that was not intended to be displayed.
It is probably the most common website vulnerability today.
It is a flaw in web application development.
How to prevent SQL injection attack?
Never concatenate a SQL string with parameters
Instead, use the right tools and libraries to safely inject parameters for you
For Python, use SQLAlchemy
For Java, Scala, Kotlin and other JVM languages use JDBC’s preparedStatement

5. What is GIT?
A distributed version control system (VCS) that enables you to store code, track revision history, merge
code changes, and revert to earlier code version when needed. It can be thought of as a backup system
for a subset of files where you want to keep historical copies. These copies are versions of your
repository.

A GITHUB, is a web storage system to support the GIT backup system.


6. What is version control?
Version control tracks the history of changes as people and teams collaborate on projects together.
To maintain stable branches
To make patches
To explain changes to new developers
To attribute good/bad changes
To find bugs

7. Central Vs Decentralized version control system


Source control management (SCM)
Tracks changes to files
Repository/databases of changes
Working directory/current state

Centralized SCM
Server: single database
Client: working directory & state
Where centralized system wins?
Single repository point
Easy setting up of access control
Partial checkout
Good user interface
Pitfalls
Centralized repository goes down.
Branching and merging
Performance issue
Incomplete merge event record
Compression tool

Decentralized SCM
Anyone can be a server.
Repository coupled with working directory.
Complete history
Disconnected operation.
Where it wins?
Distributed nature
Cheap local branching
Small space requirements
Easy to learn.
Easy merging
Any workflow

Conclusion
With decentralization…
Clients can commit changes while being offline.
A complete copy of data is stored locally thus, fast compared to a centralized system.
Decentralized system is flexible with various workflows.
Easy and cheap branching and merging.

8. Characteristics of high-quality programming code


Correctness
Readability
Maintainability
Documentation
Well organized
Strong cohesion at all levels
Single unit is responsible for single task.
Good names for classes, methods, variables.
Good programming style principles
Units are independent one of another.
Loose coupling between modules, classes, methods

9. Types of software quality


External quality
Does the software behave correctly?
Is the produced result, correct?
Does the software run fast?
Is the software UI easy to use?
Is the code securing enough?

Internal quality
Is the code easy to read and understand?
Is the code well structured?
Is the code easy to modify?

10.How to manage complexity in programming code?


Minimize the amount of complexity that anyone’s brain must deal with at certain time.
Architecture and design challenges
Design modules and classes to reduce complexity.
Code construction challenges
Apply good software construction practices:
Classes, methods, variables, naming, statements, exception handling, formatting,
comments.
Key to being an effective programmer:
Maximizing the portion of a program that you can safely ignore.
While working on any one section of code
Most practices in software development have ways to achive this important goal.

11.What is code coupling?


It measures how closely two routines or modules are connected. High coupling means that modules are
closely connected and changes in one module may affect other modules. Low coupling means that
modules are independent and changes in one module have little impact on other modules.
a. Data coupling
i. Two components are data coupled if there are homogeneous data items.
ii. Every argument is a simple argument or data structure in which all elements are used.
iii. Easy to write contracts for this and modify components independently.
b. Stamp coupling.
i. Component passes a data structure to another component that does not have access to the
entire structure.
ii. Requires a second component to know how to manipulate the data structure.
iii. May be necessary due to efficiency factors.
12.What is cohesion?
The degree to which all elements of a component are directed towards a single task and all
elements directed towards that task are contained in a single component.
Internal glue with which component is constructed.
All elements of a component are directed towards the essential for performing the same task.
High is good.

13.How to measure cohesion?


Cohesion for component “strength” refers to the notion of a module level “togetherness” seen in
system abstraction levels.
Internal cohesion for Syntactic cohesion
Closely related to the way in which large programs are modularized.
Advantage: cohesion computation can be automated
External cohesion or semantic cohesion
Extremely discernable concept that assesses whether the abstraction represented by the
module can be a “whole” semantically.

Advantage: more meaningful

14.What is package in programming code?


A namespace that groups related classes and interfaces together.
They help to organize code and make it easier to find and use.
They also provide access control, allowing you to restrict which classes and interfaces can be
accessed from the outside.

Purpose of packages:
To organize your code into logical groups. This makes your code easier to read, maintain and
understand.
To prevent naming conflicts.
To control access to your code allowing you to restrict which classes and interfaces can be
accessed from outside of the package. This helps to protect your code from unauthorized access.

15.What are some of java’s major foundations?


Java.long
Contains classes for permitive types, strings, math functions, threads, and exception handling
Java.util
Contains classes such as vectors, hash tables, date etc.
Java.io
Stream classes for I/O
Java.net
Classes for networking
Java.awt
Classes for implementing GUI-windows, buttons, menus etc.
Java.applet
Classes for creating and implementing applets.

16.What is a programming code package?


A collection of pre-written, reusable code modules or functions designed to perform specific
tasks or solve problems withing a programming language.

Adding a few more definitions that is definitely relevant to the exams.

What is DBMS( Data base management system)?


A very large, integrated collection of data
Models the real-world enterprise.
DBMS is a software package designed to store and manage databases.

Why use DBMS?


Data independence and efficient access
Data integrity and security
Uniform data administration
Concurrent access, recovery from crashes
Replication control
Reduced application development time
Why study databases?
Shift from computation to information.
Datasets are increasing in diversity and volume.
DBMS encompasses several areas of CS.

Some of the most used DDL (Data definition language) statements in SQL are:
Create table- creates a new database table.
Alter table- changes a database table.
Drop table- deletes a database table.

Structural class cohesion (SCC)


SCC measures how well class responsibilities are related.

You might also like