Fundamentals of Computer Day 9
Fundamentals of Computer Day 9
RDBMS Indexes
Indexes
An index is an ordered set of pointers to rows of a table. Unlike the rows of a table that
are not in a specific order, an index must always be maintained in order by DB2®. An index is
used for two purposes:
For performance, to retrieve data values more quickly
For uniqueness.
By creating an index on an employee's name, you can retrieve data more quickly for that
employee than by scanning the entire table. Also, by creating a unique index on an employee
number, DB2 will enforce the uniqueness of each value. A unique index is the only way DB2
can enforce uniqueness.
Creating an index automatically creates the index space, the data set that contains the
index.
RDBMS Keys
Keys
A key is one or more columns that are identified as such in the creation of a table or
index, or in the definition of referential integrity.
Primary key
A table can only have one primary key because it defines the entity. There are two
requirements for a primary key:
It must have a value, that is, it cannot be null.
It must be unique, that is, it must have a unique index defined on it.
Unique key
We already know that a primary key must be unique, but it is possible to have more than
one unique key in a table. In our EMP table example, the employee number is defined as the
primary key and is therefore unique. If we also had a social security value in our table, hopefully
that value would be unique. To guarantee this, you could create a unique index on the social
security column.
Foreign key
A foreign key is a key that is specified in a referential integrity constraint to make its
existence dependent on a primary or unique key (parent key) in another table.
Data Dictionary
• A Data Dictionary contains information about attributes or fields of a certain data set. In a
relational database, the metadata in the data dictionary includes the following:
• Names of all tables in the database and their owners.
• Names of all indexes and the columns to which the tables in those indexes relate.
• Constraints defined on tables, including primary keys, foreign-key relationships to
other tables, and not-null constraints.
• Additional physical information about the tables including their storage location,
storage method, etc.
Steps to Safeguard
How can you help protect your devices against computer viruses? Here are some of the things you can do
to help keep your computer safe.
• Use a trusted antivirus product, such as Norton Anti-Virus Basic, and keep it updated with the
latest virus definitions. Norton Security Premium offers additional protection for even more
devices, plus backup.
• Avoid clicking on any pop-up advertisements.
• Always scan your email attachments before opening them.
• Always scan the files that you download using file sharing programs.
Types of Virus
Boot sector virus
• This type of virus can take control when you start — or boot — your computer. One way
it can spread is by plugging an infected USB drive into your computer.
Web scripting virus
• This type of virus exploits the code of web browsers and web pages. If you access such a
web page, the virus can infect your computer.
Browser hijacker
• This type of virus “hijacks” certain web browser functions, and you may be automatically
directed to an unintended website.
Resident virus
• This is a general term for any virus that inserts itself in a computer system’s memory. A
resident virus can execute anytime when an operating system loads.
Direct action virus
• This type of virus comes into action when you execute a file containing a virus.
Otherwise, it remains dormant.
Polymorphic virus
• A polymorphic virus changes its code each time an infected file is executed. It does this
to evade antivirus programs.
File infector virus
• This common virus inserts malicious code into executable files — files used to perform
certain functions or operations on a system.
Multipartite virus
• This kind of virus infects and spreads in multiple ways. It can infect both program files
and system sectors.
Macro virus
• Macro viruses are written in the same macro language used for software applications.
Such viruses spread when you open an infected document, often through email
attachments.
How to remove
• You can take two approaches to removing a computer virus. One is the manual do-it-yourself
approach. The other is by enlisting the help of a reputable antivirus program.
• Want to do it yourself? There can be a lot of variables when it comes to removing a computer
virus. This process usually begins by doing a web search. You may be asked to perform a long
list of steps. You’ll need time and probably some expertise to complete the process.
• If you prefer a simpler approach, you can usually remove a computer virus by using an antivirus
software program. For instance, Norton AntiVirus Basic can remove many infections that are on
your computer. The product can also help protect you from future threats.
• Separately, Norton also offers a free, three-step virus clean-up plan. Here’s how it works.
Run a free Norton Security Scan to check for viruses and malware on your devices. Note: It does
not run on Mac OS.
Use Norton Power Eraser’s free virus and malware removal tool to destroy existing viruses. Need
help? A Norton tech can assist by remotely accessing your computer to track down and eliminate most
viruses.
Install up-to-date security software to help prevent future malware and virus threats.