ded but adding lec7 for db course
This commit is contained in:
parent
5ec3671261
commit
195e47794c
@ -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
|
||||
|
12
cst337/lec/lec7.md
Normal file
12
cst337/lec/lec7.md
Normal file
@ -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
|
BIN
cst363/lab/db-mods-transactions-lab.pdf
Normal file
BIN
cst363/lab/db-mods-transactions-lab.pdf
Normal file
Binary file not shown.
BIN
cst363/lab/outer-joins-lab.pdf
Normal file
BIN
cst363/lab/outer-joins-lab.pdf
Normal file
Binary file not shown.
60
cst363/lec/lec8.md
Normal file
60
cst363/lec/lec8.md
Normal file
@ -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_
|
||||
|
Loading…
Reference in New Issue
Block a user