current Flashcards
(42 cards)
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