current Flashcards

1
Q

are strings mutable or immutable in java and why

A

immutable.

because of security issues, minimize memory

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

what is a string

A

a data type that represents text

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

name 3 string methods

A

lenght
concat
charA

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

sql create table

A

CREATE TABLE table_name

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

sql RDMS

A

program that allows you to create, update, and administer a relational database

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

sql how to select all tables + rows

A

SELECT * FROM table_name

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

sql what does WHERE do

A

allows you to filter a result based on a condition

eg SELECT * FROM Customers
WHERE Country = Mexico
————————–
SELECT column1, column2, columnN

FROM table_name

WHERE [condition]

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

sql retrieve data from table

A

SELECT x FROM y

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

SQL truncate vs drop

A

truncate dels data from table but not table itself

drop dels table.

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

sql what is join

list joins and describe

A
  • combines records from 2 or more tables.
  • inner join
  • left join
  • rt join
  • full join

inner - returns rows having matching values in both tables.
left - returns all rows from left table and matching rows from rt table.
right- returns all rows from rt table and matching
full - returns all rows from left and rt table

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

primary key vs foreign key

A

primary key uniquely identifies each record in a db.

foreign key links two tables together

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

sql select all tables from a specific db

A

SELECT * FROM db_name

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

sql create dbase

A

CREATE DATABASE database_name

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

sql create table

A

CREATE TABLE table_name

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

sql alter table

A

adds, deletes, or modifies columns in a table
ALTER TABLE table_name

ALTER TABLE Customers
DROP COLUMN ContactName; // deletes col

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

what is sql

A

structured qurey lang. let’s you access and manipulate dbs.

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

relational database management system

A

is a program used to maintain a relational database

18
Q

relational database

A

The tables are related to each other - based on data common to each.

19
Q

sql statements

A

(TABLE) DDL - Data Definition Language - CREATE, ALTER, DROP

(DATA) DML - Data Manipulation Language - SELECT, INSERT, UPDATE, DELETE

(PERMISSIONS) DCL - Data Control Language - GRANT, REVOKE

(TRANSACTIONS) TCL - Transaction Control Language - SAVEPOINT, ROLLBACK, COMMIT

20
Q

sql create primary key

A

ALTER TABLE table_name ADD PRIMARY KEY (ID)

21
Q

sql insert

A

inserts new rows
INSERT INTO TABLE_NAME (column1, column2, column3,…columnN)

VALUES (value1, value2, value3,…valueN);

22
Q

sql update

A

update existing rows

UPDATE Customers
SET ContactName = ‘Alfred Schmidt’, City= ‘Frankfurt’
WHERE CustomerID = 1;

23
Q

ccs how to change background color

A

body{ background-color: red}

24
Q

name 5 html tags

A

img, body, head, h1, paragraph

25
Q

is js case sensitive

A

yes.

26
Q

js == vs ===

A

both check for equality. == does not care about data type while === does. strict equality

27
Q

html how to add image

A

<img></img>

followed by source to url

28
Q

html

A

hyper text markup lang > structure

29
Q

css

A

cascading style sheets > style and placement

30
Q

ways to add css file to html

A

Inline - by using the style attribute in HTML elements
Internal - by using a element in the section
External - by using an external CSS file
w/in tags

31
Q

html how to link pgs or files

A

use a tag, href, then url

32
Q

how to add external css to html

A
33
Q

how are vars declared

A

var x = 5;

34
Q

css selectors

. 
# 
p 
div, p 
div p
div > p 
div + p
A

selectors

. class
# id
p selects all p els
div, p selects all div and p els
div p, p w/in div
div > p , selects ps where parent is div
div + p, where ps are immediately after div

35
Q

DS - stack and que

A

que fifo, data can only be inserted from the rear

stack - lifo data can only be inserted from one side = top

36
Q

array list vs linked list

A

alist - better for storing and accessing data.

linked list - better for manipulating data. act as a que and list

37
Q

array vs. arraylist

A

array once created cant change. fixed length.

arraylist - var length can be changed.

38
Q

the collection interface

A

foundation upon which the collections framework is built. It declares the core methods that all collections will have.

39
Q

map interface

A

maps unique keys to values. A key is an object that you use to retrieve a value at a later date.

40
Q

set interface

A

a collection that can’t contain duplicates

41
Q

arraylist

A

resizable array

42
Q

constructor

A

initializes object