Socket Programming

Others

1NF

Using row order to convey information violates 1NF

e.g. height of a group of people, tallest is in the first row

solution: devote a separate column

Mixing data types violates 1NF

Designing a table without a primary key violates 1NF

Storing a repeating group of data items in a single row violates 1NF

2NF

deletion anomaly

update anomaly

insertion anomaly

3NF

transitive dependency

Examples:

unnormalized: The table has a repeating field – Activity ID. It also has a multi-valued field – City, State, Zip. These problems would have to be resolved to move the data into 1NF

table in 1NF (partial dependency on activity ID)

table in 1NF (partial dependency on model ID)

table in 2NF

transitive dependency on Client ID

table in 2NF

transitive dependency on volunteer id

https://www.goconqr.com/en/p/18318352/question/10123075?for\_copy=true

https://www.youtube.com/watch?v=GFQaEYEc8\_8

SQL Statements

https://www.sql-practice.com/

Data types

CREATE DATABASE database_name;
CREATE TABLE table_name (

column_name_1 data-type1(size) [NULL|NOT NULL],

ClassID INTEGER PRIMARY KEY AUTOINCREMENT,

Name TEXT(20) NOT NULL,

);

ALTER TABLE existing_table_name RENAME to new_table_name;
ALTER TABLE table_name ADD column_name data_type;

H2 Computing Notes: Comprehensive Summary