EXAM 3 (Mods 6 - 8) Flashcards

1
Q

List the 4 SQL Set Operators

A

Union, Union All, Intersect, Except

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What do the Union and Union All operators do?

A

Union: Combine rows, with no duplicates, from separate queries.

Union All: Combine rows, allowing duplicates, from separate queries.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the Intersect operator do?

A

Returns all rows common to both queries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the result of the Except operator?

A

Returns rows that appear in the first query but not in the second query (analogous to subtraction).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are some of the problems that arise when data is stored in one big long table (excel and flat files)?

A
  • Potential for lots of redundant data
  • Many updates needed when a single value is changed
  • many deletes needed to keep data clean
  • Easy for data to become out of sync or outdated
  • Structure can be hard to analyze
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Benefits of normalizing data into RDMS

A

Save disc space (not really a concern…CPU-Disc trade off)

Increased efficiency when managing data

Can use SQL -> Remove, insert, update, and delete anomalies

Increase data consistency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain the process of normalization

A

A process applied to the entities of an ER-Diagram to ensure they do not contain hidden repetitive entities that can lead to redundant data. If hidden entities are found, new tables must be made and their relationships defined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the first normal form (1NF)?

A

Data should be atomic

  • Each table cell should contain a single value.
  • Each record needs to be unique.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A table with the following attribute value structure for its address column is an example of breaking which normal form?

  • 61 William Nock cove, Winnipeg, MB, Canada R2M5S2
A

1NF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe the second normal form (2NF)

A

Remove functional dependencies on parts of a composite key.

If the value of an attribute changes only with the one part of a key changes and not the combination of the parts you have a 2NF inconsistency and you need to split the entities into separate table

*Only applies if you have a composite key. If table(s) primary key is based on a single attribute then 2NF does not apply!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the third normal form (3NF)?

A

Removes functional dependencies on non-key attributes.

  • If value of an attribute is changing based on values of another non-key attribute data is not in 3NF and must split the table to resolve the hidden entity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Special case of 3NF

A

Every column is a candidate key. Examples: periodic cable, almost every 2 column table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Four additional considerations for cleaning up ERDs

A

One-to-One
Chasm
Fan-trap
Redundant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Where to one-to-one relationships make sense/are appropriate?

A

Subtypes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When does a chasm occur?

A

When the participation in the relationship is not mandatory…results in no rows coming back when you query.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are fan-traps?

A

Occur when you have one-many-many-one. Can cause too many unrelated rows to be returned. Take relationships ambiguous. Better to do many-one then one to many.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to identify redundant relationships in ERD

A
  • look for a loop in your ERD
  • Each pathway needs to describe a different relationship, if they do then loop is valid and may have to stay.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

6 key reasons to use DB forms

A
  • Simplify the UI
  • Streamline data entry process
  • Add functionality to the DB
  • Automate common tasks
  • Make the end-user more efficient when they work w/ the DB

-Protect the base-data from corruption

19
Q

What are the two views in LibreOffice for forms?

A

Design and Form

20
Q

What is a subform?

A

A form within a form. the forms are linked based on fields

21
Q

Why use reports?

A
  • People love ‘paper’
  • Can apply branding
  • Standardize presentation of data
22
Q

What are parameters, why are they used, PostGres syntax?

A

Substitute a value for a criterion.

They allow for some flexibility in your queries, reports and forms.

:<some_message></some_message>

23
Q

What is a View?

A

A dynamic table. Essentially a an SQL SELECT statement (query) stored in the DB vs as a .sql file

24
Q

general syntax for creating a view…?

A

CREATE OR REPLACE VIEW <name> AS SELECT...</name>

25
Q

What are some advantages of VIEWs

A

-Presents “One-Big-Table” to the end user

-good for Reports in Base (forms like queries, reports like tables)

  • Generate summary tables for an IS or GIS
  • Can do spatial processing within a view query

-handy for bug workarounds

26
Q

Which tag(s) encloses metadata and info in an html document?

A

<head>
<meta></meta>
</head>

27
Q

how many html headings tags are there?

A

six

<h1> to <h6>
</h6></h1>

28
Q

List the 8 common html form tags

A

<input></input>, <textarea>, <select>, <option>, <button>, <optgroup>, <fielset>, and <label></label></fielset></button></option></select></textarea>

29
Q

what is the role of the <input></input> form tag?

A

Specifies an input field where the user can enter data. must specify a type attribute within the input tag.

30
Q

What does the <textarea> tag define in an html doc?</textarea>

A

A multi-line text input control.

31
Q

what html tag(s) is used to create a drop down list?

A

<select> is used to create a drop-down list structure
<option> is used within the select tag to define choices within the drop-down</option></select>

32
Q

What is the <optgroup> tag used for?

A

groups related options in a <select> element (drop down list)</select>

33
Q

what is the use case for the <fieldset> tag do in an html form?

A

group related elements in form and draws a box around them on the webpage.

34
Q

List 10 input type attributes for html forms

A

button, checkbox, file, hidden, image, password, radio, reset, submit, and text

35
Q

What are the 4 main elements, and their role, that contribute to an HTML 5 webpage?

A

1) H5 tags
2) CSS- for styling and structure
3) JavaScript- for DOM (Document Object Model) and BOM (Brower Object Model) manipulation, RIA (Rich Internet Application)
4) JSON- for data

36
Q

Explain the different functionality of =, ==, and === in JavaScript

A

= assignment operator
== equality
=== equal value and equal type

37
Q

Syntax for the three JavaScript logical operators

A

&&, ||, !

38
Q

Where are {} used in JavaScript?

A

objects, loops, and functions

39
Q

what are the 5 JavaScript loop types and their general syntax?

A

For (start; end ;increment){some block of code}

while (condition) {some block of code}

do {some block of code} while (condition);

for/in
-loops through the properties of an object

for/of
-loops through the values of an iterable object
-this is the most analogous to the python for loop

40
Q

what’s the general syntax of a function declaration on JavaScript?

A

function someFunctionName() {some code}

41
Q

what does the JSON.parse() function do?

A

Turns text into JS objects

42
Q

What are the 6 popular JS Frameworks?

A

JQuery, DoJo, Angular, Polymer, React, and Vue

43
Q

What are the three main JS mapping libraries?

A

Leaflet, OpenLayers3, and ESRI JS API