Comp 1314 Data Management 1 Flashcards
What are the three key features of an OS?
Multi-user: Many users same system at the same time
Multi-processing: Multiple processors at the same time
Multi-tasking: Multiple processes at the same time
What is the philosophy of UNIX?
Set the cultural norms for minimalistic modular software development
What is special about UNIX?
Programs can be stringed together but it is secure as programs do not know about each other
What is Linux based on?
UNIX
What is piping?
Redirecting the input and/or output of a program
What is the symbol for piping?
|
Program1 | Program2
What is the Input/Output redirection symbol?
<: Input
>: Output
»: Append
List some programs that you can use
Head
Tail
sort
wc
uniq
du
xargs
more
cut
find
tar
gzip
nohup
parallel
basename
What are the environmental variables?
A set of variables that every running process has access to
Set using the export command
How do you write a for loop in bash?
for var in directionory;
do
something
done;
How do you do a while loop in bash?
cat file | while read line;
do
something
done;
What does grep do?
Searches for the input provided in the text provided
Can even use regular expressions
What does SED stand for?
Text Stream Editor
What does SED do?
Reads the input provided and modifies it as specified by the command and then writes that to the standard input
sed [options] command [file]
What does scp do?
Securely copies files from a secured server
What does awk do?
For processing structured text files into rows and columns
What are wildcards for?
Allows multiple arguments for commands (accessing multiple files becomes easy) using regular expressions
What are the three permission categories?
u: users
g: group
o: others
How do you change the permissions of a file?
chmod u+=x
chmod g-w*
You can also specify a decimal number which will be converted into binary and then assigned where each bit is a 1
Who can change the permissions of a file?
The owner of a file and the superuser
What is everything in UNIX?
Either a file or a process, this include directories.
How can you move a process to the background?
bg
Adding a & symbol will begin the process in the background
What are the two options with the kill command?
SIGTERM: A gentle request to kill, giving the process time to close
SIGKILL: A hard-request with no clean up time.
How can you prevent all processes terminating when you log off?
With screens
What is a CSV file?
Comma separate values
Easy to manipulate and process but new lines and commas in text can be problematic
What does YAML stand for?
Yet Another Markup Language
Fixed Row and column format
Widely used within config files and passing messages between applications
Made of key-value pairs
What does JSON stand for?
JavaScript Object Notation
What are the benefits of being understandable as a machine?
Searching
Aggregation and Summarisation
Prediction
What is metadata?
Data that is useful for the machine, but not for the human.
What is markup?
Contains a bunch of semantic links to other pages.
What is SGML?
Standard Generalised Markup Language
A superset of all markup language
Separate structure from content
What is XML?
Extensible Markup Language
Designed to carry data, not display data
What must XML have?
A root element
What is the issue with namespaces?
XML files can reference other XML files and people can define two tags with the same name
How is the namespace problem resolved?
Using the special namespace tag to separate the two documents apart.
What is a URI?
A unique full name of the namespaces, by convention this is used as the URL but they are not the same.
What does a schema enable us to do?
Gives meaning to the structured data we work with, lots of people have already done this.
So there are a lot of different schemas
Give an example schema
<Pizza>
<base></base>Pan</Base>
<Cheese>Cheddar</Cheese>
</Pizza>
How can we specify the number of occurrences in a sequence?
minOccurs
maxOccurs
What does DTD stand for?
Document Type Definition
What is XSD?
XML Schema Definition
Every element is either simple or complex
How many parsers does HTML5 contain?
2
One which can parse HTML or XML
Why is XML not used for large scale solutions?
We could easily loose all of the data, database can mitigate this.