You are on page 1of 2

Chapter 1: INTRODUCTION DBMS = a collection of programs that enables users to create and maintain a DB.

A general purpose software system facilitating the construction, defining, manipulating and sharing of DB resources. Meta data = DB catalog or dictionary, descriptive information. CHARACTERISTICS OF DB: 1. Self describing nature of DB 2. Insulation btwn programs and data & data abstraction 3. Supports multiple views of the data 4. Sharing and multiuser transaction processing Actors on the scene: a) DBA manages the day to day running of the DB. Provides access, coordination and monitoring use. Security and system response are common problems he deals with. b) DB designers responsible for requirements analysis and designing the structure of the DB. c) End users pple whose jobs require access to the DB, querying, updating, reports. i. Casual end users they require diffrn info on each visit.ey use high level querie.e.g managers/browsers. ii. Naive/parametric end user eir jobs revolve arnd DB using standard quires.e.g bank tellers, hotel/airline clerks iii. Sophisticated end users familiarise themselves the facilities of the DBMS for their application and complex requirements.e,g engineers, scientist, business analysts etc iv. Standalone users maintain personal DB s tht provide easy to use menu based or graphics based interface.e.g tax personel d) System Analysts and application programmers determine the ada users requirements esp end users nd develop transactions tht meet th requirements. Pros of DB: Controlling redundancy Restricting Unauthorized access Provides persistent storage Providing storage structure for efficient query processing Representing complex relationship among data Enforcing integrity constraints Permitting inferences and action using rules Chapter 3: Data Modelling ER== schema Entity object or representation of a table , usually a noun. Relation shows how the tables relate, usually verbs Attributes fields in a tables defining the table

Derived attribute is usually an aggregation valued calculated to reduce repeated computation when needed. Participation Constraints every entity set must required to participate in at least one of the key constraints is total participation otherwise its partial. Cardinality specifies e possible number of instances for an entity can participate in. 1:1, 1: N, N: 1, M: N, Cardinality = rows and degree/arity = columns Integrity constraints insures the data integrity and reliability. Entity integrity ensured by using a PK ,maintains identity of turples Referential integrity is ensured by using a FK, maintains consistency of data. General constraints specify the functional dependency, state constraints and transition constraints. A disjoint relation shows the specialisation relation.sub classes of a class which would never overlap are connected to general one, joined with a circle labelled d. When a group of subclass are grouped into a general one its generalisation and it s called overlapping indicates by a join with the label o. Aggregation is when an relating entities are grouped and linked to one super entity. Chapter 8: SQL SELECT, FROM, WHERE, GROUP BY , HAVING, ORDER BY INSERT INTO <table name> OR table<attributes list> VALUES (ordered and corresponding entries); DELETE FROM <table name> [WHERE <selection condition>] CREATE TABLE <table name> (...) DROP TABLE <table name> ALTER TABLE <table name> ADD<column: list> Schema is a collection of tables and Catalog a named collection of schemas in a sql environment. Attributes Data types: Numeric, Character, Bit-String, Boolean, Timestamp

Chapter 6: Relation Algebra and calculus Algebra is a sequence relation operation for the relation model to specify possible queries. Calculus is a high level declarative language showing relation among attributes in a query SELECT<condition>TABLE/SUB-SET (use Greek letter pho) PROJECT (attribute list) Table/sub-set (use Greek letter pi) The above functions are used with algebra function in line or in sequence to form queries.

BINARY operations like UNION, INTERSECTION, MINUS are used on tables of same cardinality also with the queries. Product: is a n operation that joins turples even if they are different.aka CROSS JOIN JOIN binds two related turples into one longer temporary turples. (Use two triangles facing each other on their sides) DIVISION returns distinct rows of columns in the numerator turple that have the same corresponding column that is equal to one in the divisor Difference returns those turples that don t appear in the other. Function used with aggregation functions to compute them and use in queries. <Grouping attributes>function<function list>Turple Chapter 15 & 16: Normalization Update anomalies are discrepancies due to change in data or the structure of the schema. Insertion anomaly: occurs whereby when inserting data there are some fields missing hence NULL used. Also can occur when a table is inserted and it has no values yet hence will be filled with NULL values Deletion Anomaly: occurs when deleting topples that may be the last link to another table in the schema; hence all the information about that table would be lost. Modification Anomaly: this occurs when a change in the value of an attribute or structure of table occurs forcing the need for cascaded update otherwise it creates inconsistencies. Functional Dependency (FD) a constraint btwn 2 sets of attributes 4rm the DB. Denoted X Y (X defines Y or Y depend on X) But X Y! = Y X For any t1, t2, where t1[X] = t2[X] thn MUST t1[Y] = t2[Y] Normalization is a table design technique aimed at Minimizing data redundancies 1NF all the attributes have to be atomic (simple and indivisible). No multi valued attributes or nested relations 2NF All attributes in FK s or PK s must be functionally dependent. For multivalve PK, no non key value that dependent on part of the key NB: if the PK is a single attribute no need for the test. 3NF the PK should not have any transitive FD s Transitive f dean a non key being depend on a non key BCNF has to be in 3NF and every determinant in fd must be in a candidate key. No circular FD s 4NF, 5NF and not commonly used Denormalisation is returning back to previous normal form. If data relation stays the same b4 and after normalising then the entity is lossless.

Minimal Set aka minimal cover is a set of FD s in E such that every FD in E belongs to the closure F+ of F. Chapter 17: Physical storage and files Track is divided into blocks and a block is a portion on disk where data is stored. Data is transferred btwn CPU and memory in blocks and its time consuming due to seek and latency time (read delay). Blocking means a number of records in one block on disc. Blocking factor (bfr) = block size / record length (floor) # of records per block #blocks a file needs = # block / bfr (ceiling) Spanned records these are large records that fit in more than one block. File a collection of data values in a sequence of records. Files can be stored in dick in contiguous, linked or indexed form. Heap unordered files where new records are added at the end. RAID is a collection of disk in an array working as one high performance logical disk. Hashing stored files in buckets which are block size and indexed with a hashing function based on hash keys. Collision occurs when an already full block is indexed for allocation. Average search time with linear search = b/2 * block transfer time. With hashing or binary search = ceiling (log2b)* block transfer time Chapter 18: Indexing Structures and files Search key an attributed selected 4 use in finding location of data in a relation. Clustering index is an index defined on an ordered data file, file ordered on a non key field. B+- trees aka 2-3 are data structures that use a key to help increase access into data. Always store the new values in the leaf nodes. If the root is full, raise the middle value to root and connect adjacent values. Repeat successively till the values are in order. When deleting remove 1st occurrence on leaf first. Bulk loading when inserting data into a B+ trees, it is sorted first then a tree is created from the sorted data to increase efficiency.

You might also like