New Job 1 Flashcards
What is the difference between Java and Javascript
Key differences between Java and JavaScript:
- Java is an OOP programming language while Java Script is an OOP scripting language.
- Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only.
- Java code needs to be compiled while JavaScript code are all in text.
package inputdemo
import java.util.Scanner
what is java.util.Scanner?
a class
objects are created from templates known as…
classes
Scanner input = new Scanner(System.in); - name each part
Scanner is the class input is the name of the Scanner object we're creating
In relational databases, rows are also called….
tuples or records
In relational databased, columns are also called…
attributes
In RDs, each row needs a…
unique key
A foreign key is
A column for the unique key of the linked row, which is used to link rows in a table to a row in another table
Primary key
Specific choice of a minimal set of attributes (columns) that uniquely specify a tuple (row) in a relation (table)
Surrogate key
an attribute created to function as a key (ie. case_id). Usually the primary key
Natural key
Real-world observations (like time and location of birth), usually the alternate keys
Candidate key
Minimal superkey for that relation; that is, a set of attributes such that:
- The relation does not have two distinct tuples (i.e. rows or records in common database language) with the same values for these attributes (which means that the set of attributes is a superkey)
- There is no proper subset of these attributes for which (1) holds (which means that the set is minimal).
Prime attributes
Attributes that are included in the candidate key
Superkey
a set of attributes of a relation variable for which it holds that in all relations assigned to that variable, there are no two distinct tuples (rows) that have the same values for the attributes in this set. The set of all attributes is a trivial key (because no two rows can be exactly the same)
When a PK migrates to another table, it becomes a….
foreign key