Chapter 7: Files & Input Flashcards
Why shouldn’t files be ‘opened’ for too long?
When a file is open, they can easily be corrupted, thus they should be kept open for the shortest time possible.
This is because, if the solution crashes, the file will be corrupted/damaged if the file is open.
Why is security required?
As files can contain sensitive user information (usernames & passwords), leaving a file unprotected can be dangerous as someone can access the file DIRECTLY rather than through the solution.
What are some security measures to put into place to prevent unauthorised access?
1) Encryption
2) Files can be password protected
3) Files can be placed into folders that are only accessible by the administrator
Define archiving
The process of removing unwanted files to be accessed to another storage place that can securely store them for a LIMITED amount of time, for instance Recycle bin.
Why is archiving necessary?
Because storage space is LIMITED. It is necessary to remove the files that you no longer need.
What are some threats to data?
1) Accidental
2) Event-based
3) Deliberate
What is involved in performing a backup?
1) Simple as making a copy -> placing it in a secure location
2) The frequency of the backup DEPENDS on
- how much data is there to backup
- facilities available
- how valuable the data is
What is Version Control Software (VCS)?
Applications that help organisations keep track of their backup versions, which is vital for managing backups.
What is the use of a Uninterrupted Power Supply (UPS)
In the event of a power outage, a UPS can keep a server running for enough time to complete an (up-to-date) backup and for the system to SAFELY SHUTDOWN without damaging any files.
How does a full backup work?
Data is copied to the backup media
Advantage of full backup
A full backup is able to restore the ENTIRE set of data at once
Disadvantages of full backup
1) Time consuming if there is a large amount of data to backup
2) Requires a medium (e.g. usb) which can store the combined size of all the files -> EXPENSIVE
When should a backup be performed?
Usually at the end of the day. BECAUSE:
-> because the backup can interrupt the procedure
-> it can take a long time to complete, which is why they are generally performed at night
What should you consider when backing up?
The backup media should be able to ACCOMMODATE the size of the backup, without having to swap or change the media in between/during the backup process.
How does a Differential backup work?
1) A full backup is made
2) Subsequent backups only contain the FILES that have changed
Advantages of differential backup
1) Only 2 backups are made, (the full backup and the most recent differential backup)
2) The process of completing daily backups is more simpler and quick
Disadvantages of differential backup
1) RESTORING the backup is more complex than restoring a full backup
2) to FULLY RESTORE the backup,
the full backup needs to be restored and also the most recent differential backup
3) When the number of files grow, the size of a differential backup will be too large to handle, and thus will require ANOTHER FULL BACKUP
How does an incremental backup work?
1) Full backup is made
2) The Subsequent backups consist of changes to the previous incremental backup.
What is the advantage of incremental backup?
The BACKUP process is fast and efficient
What are the disadvantages of using incremental backup?
to RESTORE, it takes longer/is more complicated because the full backup needs to be restored + ALL the incremental backups in order.
What does the backup media Cloud Storage involve?
Moving the data to the cloud storage on a regular schedule, or manually, such as Google drive, Onedrive.
Advantages of using Cloud Storage of backup media
1) Independent of physical media and only relies on the accessibility of the CLOUD SERVER
2) RETRIEVING the backup just requires you to connect to the cloud server and transferring the required files.
Disadvantages of using Cloud Storage
During a power outage, you cannot access the data
Advantages of using Tape backup as backup media
1) Holds onto data for a really long time
2) Cheap
3) Portable and small
4) Easy to store compared to other physical media
5) many formats involve encryption
Disadvantages of using Tape backup
Time consuming, limited space
Advantages of using hard disk as a backup media
1) Performing a backup is quick
2) Large capacity
3) Portable
4) Can be connected to an information system
Disadvantages of using a hard disk as a backup media
1) Can be easily damaged
2) Volatility
3) Do not retain data for a long period of time
Advantages of using SSD (Solid State Drive)
1) Highly portable
2) Easy to transport
3) Less likely to be physically damaged
4) Speed is relatively good
Disadvantages of using SSD (Solid State Drive)
1) Information on their ability to retain data is limited
2) Very expensive
3) Data recovery is difficult if a SSD FAILS
What are the factors you should consider
1) Backups should be easily accessible
2) Despite backups, there will still be a version gap between the data that has been lost and the last backup
3) At least one backup should be kept OFFSITE in the event of a disaster
4) MULTIPLES of backup media should be produced in case a media fails
5) A backup procedure should include a detailed procedure.
What are Data Structures?
The ways that data can be stored to enable efficient algorithms to be used to optimise program execution time.
How do arrays work?
A set of data elements under the same name, where they can hold any type of data (SAME TYPE, for instance only strings or only numbers),
Accessed via a index starting from 0
Advantages and disadvantages of Arrays
Advantages
1) Easy to use
2) Every Language supoorts them
Disadvantages:
1) Array elements need to be of the same type, which is why records can be used
2) The size of an array can make it time consuming to navigate
What are the advantages/disadvantages of using dictionaries?
Users can access both the key and value,
however, only one value is stored per key, which also has to be unique
What are classes?
Objects that have a number of methods and events associated within it
They can be duplicated as many times as required
You can declare objects within a particular class and it can be referenced on its own
Advantages and disadvantages of classes
1) Useful when a large number of objects needs to be created, or when standard variables would be difficult to use
Shortcoming:
- Can be hard to define initially
What is the difference between records and arrays?
Records are structures that can used to group together variables for a particular purpose.
While an array usually contains elements of all the same variable type, the fields within a record may be of different types + sizes.
What are stacks and how do they work?
One-dimensional array of values that are accessed in a particular way.
-> Works on the principle First in Last out (FILO)
-> A ‘push’ function adds data to the top of the stack
-> A ‘pop’ function removes data from the top of the stack
THE ELEMENT THAT IS INSERTED FIRST, COMES OUT LAST
What are the advantages and disadvantages of using stacks?
As they use FILO, they are useful in executing code and backtracking through “call to functions” once they have been completed.
The disadvantage is that they are limited in size.
What are linked lists and how do you create/use them
Data structure that maintains itself in order at all times. (BASICALLY SORTED ARRAYS). The elements are placed in the correct order STRAIGHT AWAY, which is better than using arrays where they are unsorted and you need to use sorting algorithms to sort them in order.
To create a linked list,you need 2 lists:
1) One to store the required information
2) One to store the links which will point to the next array element
advantages and disadvantages of using linked lists
Benefits:
1) Very large
2) Elements are added in order
Shortcomings:
1) Maintaining the list can be difficult, but arrays are even harder
What is a data structure
A way of organising data in a computer so that it can be used effectively\