Ch 16 ***** - A switch either connects or disconnects two wires, to allow or disallow electricity to flow between them. - Transistors are made of semiconductors and built using Metal-Oxide Semiconductor (MOS) technology. - A transistor is of either the PMOS or NMOS type, depending on whether it is positively or negatively doped. - Transistors are combined to form circuits to produce particular behaviors. - Circuits are built from gates. - Gates compute functions from input values. - The 3 primary gates are NOT, AND, OR gates. - Logic tables - Logic expressions - Schematic diagrams of gates and circuits - A flip-flop is the memory circuit for storing one bit. - A half-adder takes 2 input bits and produces as output the sum and carry bits. - A full-adder takes 3 input bits and produces as output the sum and carry bits. - A circuit for adding 2 numbers can be constructed using a combination of full adders. Ch 18 ***** http://homepages.gac.edu/~sskulrat/Courses/2006F-170/lectures/chap18/index.html Database Management System (DBMS) ********************************* - Relational DBMS views a database as a collection of tables and the relationships among them. - Database tables differ from everyday tables. Database tables have structure while everyday tables do not. The structure of a database table is separate from its content (data). - Database Terms * metadata - describes the structure of the data * entities - the sorts of information that are being kept in the database * attributes - features or properties of the entities * value - each of the entity's attributes has a value * rows or tuples - each row represents one entity * fields - a tuple is a set of fields, each field containing the value of one of the attributes of that entity - To define a database table means to provide three things: 1) NAME of the table 2) FIELD SPECIFIERS, each consisting of: field_name, data_format, and optinal_comment 3) PRIMARY KEY - A primary key is one or more fields that uniquely identify any row in the table. - A foreign key in one table is a field that appears as a primary key in another table. - Theoretical operations on database tables: * select - takes rows from one table to create another table * project - takes columns from one table to create another table * product - creates a supertable from 2 tables. The new table has all the fields from both tables. Rows of the new table are created by appending each row of the second table to each row of the first table. * join - similar to product, but combines only the rows of the given tables that match on the given fields. * union * difference - To query a database means to create a logical table from existing physical tables or other logical tables. - SQL (Structured Query Language) is the standard query language. Its syntax is SELECT list_of_fields FROM tables(s) WHERE constraints_on_the_rows