diff --git a/cst337/lec/lec6.md b/cst337/lec/lec6.md index 2da2946..c115a8e 100644 --- a/cst337/lec/lec6.md +++ b/cst337/lec/lec6.md @@ -1,6 +1,6 @@ # lec6 -> diagrams needed for this +> diagrams needed for this section ## Transistors @@ -22,8 +22,3 @@ When the base/gate is "on" we mean current can _not_ flow from the emitter to th > When we say that a gate is "on" we're really saying that it's open. -## Gates: AND, OR, NOT, XOR - -For this section we'll be using intel assembly syntax where the general syntax follows the form: `op src, dest`. -This will hold as long as op is the desired operation to represent the gate, src, will be one of our operands which holds the result after the operation, and dest holds the result after the operation. -### AND diff --git a/cst337/lec/lec7.md b/cst337/lec/lec7.md new file mode 100644 index 0000000..e0fda02 --- /dev/null +++ b/cst337/lec/lec7.md @@ -0,0 +1,12 @@ +# lec7 + +> this section also needs diagrams to make any sense + +Now we'll take about different gates. + +## OR +## AND +## XOR +## NOT + +## Resistor Bands diff --git a/cst363/lab/db-mods-transactions-lab.pdf b/cst363/lab/db-mods-transactions-lab.pdf new file mode 100644 index 0000000..008ebfb Binary files /dev/null and b/cst363/lab/db-mods-transactions-lab.pdf differ diff --git a/cst363/lab/outer-joins-lab.pdf b/cst363/lab/outer-joins-lab.pdf new file mode 100644 index 0000000..fa6dded Binary files /dev/null and b/cst363/lab/outer-joins-lab.pdf differ diff --git a/cst363/lec/lec8.md b/cst363/lec/lec8.md new file mode 100644 index 0000000..0c065aa --- /dev/null +++ b/cst363/lec/lec8.md @@ -0,0 +1,60 @@ +# lec8 + +## Lab + +The lab exercises for this lecture can found under `lab/` as `db-mods-transactions-lab.pdf`. + + +DB Modifications, plus transactions + +## Modifyinig Data + +Since we're dealing with data we may need to add, delete or modify entries in some table. + +When we have inserted data before we have done simple insertions like in the previous lab exercises `insert into tableName values(...);`. +Where the arguments are listed in the same order as they are listed in the table structure. + +However, we can pass arguments by name, elminating the need to provide them in a rigid order: +``` +insert into tableName(list, of, attributes) values('respective', 'data', 'entries'); +``` + +We can also move things from one table into another table. +``` +insert into targetTable select ... from hostTable; +``` + +### Deleting + +``` +delete from tableName where ...; +``` + +Deletes a _whole row_. +Caution: the delete operation also accepts tables as valid arguments so a query that returns multiple rows as a table will be deleted in the `targetTable` mentioned earlier. + +### Updating entries + +``` +update table set attribute=123 where def='abc'; +``` + +The above updates an attribute based on the condiftion `where def='abc'`. + +## Transactions + +Set of instructions which upon failure do not modify any state. + +``` +begin; + // set of commands + // wew +end; +``` + +## Inner/Outer Joins + +> left (left outer) + +_the outer part is implied so it's unnecessary to write it in_ +