current Flashcards
are strings mutable or immutable in java and why
immutable.
because of security issues, minimize memory
what is a string
a data type that represents text
name 3 string methods
lenght
concat
charA
sql create table
CREATE TABLE table_name
sql RDMS
program that allows you to create, update, and administer a relational database
sql how to select all tables + rows
SELECT * FROM table_name
sql what does WHERE do
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]
sql retrieve data from table
SELECT x FROM y
SQL truncate vs drop
truncate dels data from table but not table itself
drop dels table.
sql what is join
list joins and describe
- 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
primary key vs foreign key
primary key uniquely identifies each record in a db.
foreign key links two tables together
sql select all tables from a specific db
SELECT * FROM db_name
sql create dbase
CREATE DATABASE database_name
sql create table
CREATE TABLE table_name
sql alter table
adds, deletes, or modifies columns in a table
ALTER TABLE table_name
ALTER TABLE Customers
DROP COLUMN ContactName; // deletes col
what is sql
structured qurey lang. let’s you access and manipulate dbs.
relational database management system
is a program used to maintain a relational database
relational database
The tables are related to each other - based on data common to each.
sql statements
(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
sql create primary key
ALTER TABLE table_name ADD PRIMARY KEY (ID)
sql insert
inserts new rows
INSERT INTO TABLE_NAME (column1, column2, column3,…columnN)
VALUES (value1, value2, value3,…valueN);
sql update
update existing rows
UPDATE Customers
SET ContactName = ‘Alfred Schmidt’, City= ‘Frankfurt’
WHERE CustomerID = 1;
ccs how to change background color
body{ background-color: red}
name 5 html tags
img, body, head, h1, paragraph
is js case sensitive
yes.
js == vs ===
both check for equality. == does not care about data type while === does. strict equality
html how to add image
<img></img>
followed by source to url
html
hyper text markup lang > structure
css
cascading style sheets > style and placement
ways to add css file to html
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
html how to link pgs or files
use a tag, href, then url
how to add external css to html
how are vars declared
var x = 5;
css selectors
. # p div, p div p div > p div + p
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
DS - stack and que
que fifo, data can only be inserted from the rear
stack - lifo data can only be inserted from one side = top
array list vs linked list
alist - better for storing and accessing data.
linked list - better for manipulating data. act as a que and list
array vs. arraylist
array once created cant change. fixed length.
arraylist - var length can be changed.
the collection interface
foundation upon which the collections framework is built. It declares the core methods that all collections will have.
map interface
maps unique keys to values. A key is an object that you use to retrieve a value at a later date.
set interface
a collection that can’t contain duplicates
arraylist
resizable array
constructor
initializes object