Partial preview of the text
Download WGU- D426 Objective Assessment Exam Study Guide. and more Exams Digital Systems Design in PDF only on Docsity!
Software that helps business users interact with database systems. - /V ¥ Database Application Responsible for securing the database system against unauthorized users. A database administrator enforces procedures for user access and database system availability. - vv ¥ Database Administrator Many database users should have limited access to specific tables, columns, or rows of a database. Database systems authorize individual users to access specific data. - Y/Y Authorization Database systems ensure data is consistent with structural and business rules. - V/V / Rules Interprets queries, creates a plan to modify the database or retrieve data, and returns query results to the application. Performs query optimization to ensure the most efficient instructions are executed on the data. - /V ¥ Query Processor Translates the query processor instructions into low-level file-system commands that modify or retrieve data. Database sizes range from megabytes to many terabytes, so the storage manager uses indexes to quickly locate data. - /V ¥ Storage Manager Ensures transactions are properly executed. The transaction manager prevents conflicts between concurrent transactions. The transaction manager also restores the database to a consistent state in the event of a transaction or system failure. - /V ¥ Transaction Manager Data about the database, such as column names and the number of rows in each table. - v/v Metadata Stores data in tables, columns, and rows, similar to a spreadsheet. - /V V Relational Database All systems support the SQL query language. - / VV Relational Database Relational systems are ideal for databases that require an accurate record of every transaction, such as banking, airline reservation systems, and student records. - /V¥ Relational Database The newer non-relational systems are called NoSQL, for 'not only SQL’, and are optimized for big data. - YV¥ MongoDB (NoSQL) INSERT inserts rows into a table. SELECT retrieves data from a table. UPDATE modifies data in a table. DELETE deletes rows from a table. - /¥ ¥ SQL Statements A statement that creates a new table by specifying the table and column names. Each column is assigned a data type that indicates the format of column values. Data types can be numeric, textual, or complex. - YW ¥ CREATE TABLE (Statement) INT stores integer values. DECIMAL stores fractional numeric values. VARCHAR stores textual values. DATE stores year, month, and day. - // ¥ Data Type Analysis Logical design Physical design - YV ¥ Database Design This phase specifies database requirements without regard to a specific database system. Requirements are represented as entities, relationships, and attributes. An entity is a person, place, activity, or thing. A relationship is a link between entities, and an attribute is a descriptive property of an entity. - /Vv Analysis Phase, Conceptual Design, Entity-Relationship Modeling (Database Design) This phase implements database requirements in a specific database system. For relational database systems, design converts entities, relationships, and attributes into tables, keys, and columns. - / Vv Logical Design (Database Design) Specifies indexes, table structures, and partitions. This phase adds indexes and specifies how tables are organized on storage media. Affects query processing speed but never affects the query result. - YY ¥ Physical Design Allows database designers to tune query performance without changes to application programs. - /¥¥ Data Independence To simplify the use of SQL with a general-purpose language, database programs typically use an .-¥V¥ Application Programming Interface (API) A text interface included in the MySQL Server download. - /¥ “ MySQL Command-Line Client Data Manipulation Language (DML) manipulates data stored in a database. Data Control Language (DCL) controls database user access. Data Transaction Language (DTL) manages database transactions. - /V¥¥ SQL Sublanguages Asingle column of a single row. - VV ¥ Cell Rows - vv Not Ordered Rule 7. Allows database administrators to improve query performance by changing the organization of data on storage devices, without affecting query results. - /V ¥ Data Independence Statement that deletes a table, along with all the table's rows, from a database. - ///V DROP TABLE Statement that adds, deletes, or modifies columns on an existing table. - VW ¥ ALTER TABLE 4 bytes - YVV INT 2 bytes - /V 4 SMALLINT 8 bytes - /V Vv BIGINT 1 byte - ¥¥¥ TINYINT 3 bytes - ¥¥ ¥ MEDIUMINT Divides one numeric value by another and returns the integer remainder - VV ¥ % (Modulo) Raises one numeric value to the power of another. - Yv ¥ “ Compares two values for equality. - //¥ = Compares two values for inequality. - V/V v != A special value that represents either unknown or inapplicable data. - V/V.“ NULL INTO clause names the table and columns where data is to be added. The keyword INTO is optional. VALUES clause specifies the column values to be added. - /¥ ¥ INSERT Statement (Clauses) INSERT [INTO] TableName (Column1, Column2, ...)VALUES (Value1, Value2, . INSERT Statement (Syntax) pV Uses the SET clause to specify the new column values. An optional WHERE clause specifies which rows are updated. Omitting the WHERE clause results in all rows being updated. - /V ¥ UPDATE Statement (Clauses) The FROM keyword is followed by the table name whose rows are to be deleted. An optional WHERE clause specifies which rows should be deleted. Omitting the WHERE clause results in all rows in the table being deleted. - // Y DELETE Statement (Keywords/Clauses) Deletes all rows from a table. - YY ¥ TRUNCATE Statement A is a constraint on a column, or group of columns, used to identify a row. The is usually the table's first column and appears on the left of table diagrams, but the position is not significant to the database. A solid circle (e) notates these in table diagrams. MUST BE "Unique" and "Not NULL" - //¥ Primary Key Akey that consists of a SINGLE column. - /¥ ¥ Simple Primary Key Akey that consists of multiple columns and is denoted with parenthesis. MUST BE Minimal, meaning only NECESSARY primary keys may be involved. In it's minimal stage, if one of these keys is removed it then becomes no longer unique. - // / Composite Key Database users occasionally make the following errors when inserting primary keys: Inserting values for auto-increment primary keys. Omitting values for primary keys that are not auto-increment columns. MySQL allows insertion of a specific value to an auto-increment column. However, overriding auto-increment for a primary key is usually a mistake. - VV ¥ Auto-Increment Is a column, or group of columns, that refer to a primary key. An empty circle (2) represents foreign keys in table diagrams, and an arrow leads to the referenced primary key. When a constraint is specified, the database rejects insert, update, and delete statements that violate referential integrity. MAX() finds the maximum value in the set. SUM() sums all the values in the set. AVG() computes the arithmetic mean of all the values in the set. - / V ¥ Aggregate (Function) The HAVING clause is used with the GROUP BY clause to filter group results. - VV HAVING (Clause) A is a SELECT statement that combines data from two tables, known as the left table and right table, into a single result. The tables are combined by comparing columns from the left and right tables, usually with the = operator. - ¥v¥ v JOIN Acolumn name can be replaced with an alias. The alias follows the column name, separated by an optional AS keyword. - / Vv AS (Alias) Selects only matching left and right table rows. - YY ¥ INNER JOIN Selects all left and right table rows, regardless of match. - // “ FULLJOIN Selects all left table rows, but only matching right table rows. - //v LEFT JOIN Selects all right table rows, but only matching left table rows. - //¥ RIGHT JOIN Any join that selects unmatched rows, including left, right, and full joins. - YW “ OUTER JOIN The keyword combines the two results into one table. - vv“ UNION (Keyword) An compares columns of two tables with the = operator. This is the most common type of join. - ¥¥ ¥ EQUIJOIN Anon-equijoin compares columns with an operator other than =, suchas < and >.-//¥ NON-EQUIJOIN A combines two tables without comparing columns without an ON clause. This is the only JOIN that does not require a condition. - Y¥ ¥ CROSS-JOIN A joins a table to itself. - /V ¥ SELF-JOIN Sometimes called anested query or inner query, is a query within another SQL query. - v¥ VV Subquery In some databases, view data can be stored. A is a view for which data is stored at all times. Whenever a base table changes, the corresponding view tables can also change, so this view must be refreshed. - /V ¥ Materialized View When is specified, the database rejects inserts and updates that do not satisfy the view query WHERE clause. - “VY WITH CHECK OPTION An entity is documented in the data model, but not tracked with data in the database. In an ER diagram, intangible entities are distinguished with special notation, such as a dashed rectangle or distinct color. - Y¥ ¥ Intangible Entity Weak Entities - Y“/ Dependent Entities Agroup of related entities. - / VV Subject Area Commonly used for software development. Software data structures are similarto database structures - /// Unified Modeling Language (UML) Each entity becomes a table and each attribute becomes a column. Tables and columns are revised in subsequent steps. - Y“¥ Logical Design Phase (First Step) Informally, a table is in when all non-key columns depend on the key, the whole key, and nothing but the key. - VJ Third Normal Form A table is in when all non-key columns depend on the whole primary key. In other words, a non-key column cannot depend on part of a composite primary key. A table with a simple primary key is in this form. - /“ 4 Second Normal Form Every non-key column depends on the primary key. Every primary key value appears in exactly one row, and each non-key cell contains exactly one value. Each primary key is related to exactly one non-key value. - /V¥¥ First Normal Form An is a high-level representation of data requirements, ignoring implementation details. - YY ¥ Entity-Relationship Model Aperson, place, product, concept, or activity. - /v¥ Entity A statement about two entities. - YY ¥ Relationship Adescriptive property of an entity. - Vv ¥ Attribute A relates an entity to itself. - Vv V Reflexive Relationship After entities, relationships, attributes, cardinality, and strong and weak entities are determined, the database designer looks for supertype and subtype entities. - /“¥ Database Design Creating supertype and subtype entities is the of four analysis steps: 1. Discover entities, relationships, and attributes 2. Determine cardinality 3. Distinguish strong and weak entities 4. Create supertype and subtype entities - / VV Last Step Logical design converts an entity-relationship model to tables, columns, and keys fora specific database system. - / VV Logical Design One popular convention, called Crow's Foot Notation, depicts cardinality as a circle (zero), a short line (one), or three short lines (many). The three short lines look like a bird's foot, hence the name "crow's foot notation". - /¥¥ Crow's Foot Notation An is documented in the data model, but not tracked with data in the database. The logical rules and constraints that govern the data but aren't explicitly stored as data themselves. - ¥ VV Intangible Entity values should be easy to type and store and is associated with a SINGLE COLUMN. Small values are easy to specify in an SQL WHERE clause and speed up query processing. Ex: A 2-byte integer is easier to type and faster to process than a 15-byte character string. - //¥ Simple Primary Key An is a single-column primary key created by the database designer when no suitable single-column or composite primary key exists. Usually artificial key values are integers, generated automatically by the database as new rows are inserted to the table. Artificial keys are stable, simple, and meaningless. - / Vv Artificial Key Dependence of one column on another is called functional dependence. - ¥ ¥ ¥ Functional Dependence is the repetition of related values in a table. - // / Redundancy are rules for designing tables with less redundancy. - Vv ¥ Normal forms When the columns of A are a subset of the columns of B, A always depends on B. Ex: FareClass depends on (FlightCode, FareClass). These dependencies are called .-VV¥ Trivial Redundancy is eliminated with the last step of logical design. - /V¥ Normalization eliminates redundancy by decomposing a table into two or more tables in higher normal form. Ex: A table in first normal form might be replaced by two tables in third normal form. In principle, normalization decomposes tables to any higher normal form. - /V¥ Normalization is ideal for tables with frequent inserts, updates, and deletes. - /// Boyce-Codd normal form means intentionally introducing redundancy by merging tables. - v¥¥¥ Denormalization Heap table Sorted table Hash table Table cluster - vv ¥ Databases commonly support four alternative table structures: In a , no order is imposed on rows. - //¥ Heap Table optimize insert operations. Heap tables are particularly fast for bulk load of many rows, since rows are stored in load order. - /V ¥ Heap Tables Ina , fOws are assigned to buckets. A bucket is a block or group of blocks containing rows. - ¥¥¥ Hash Table The function is a simple hash function with four steps: 1. Convert the hash key by interpreting the key's bits as an integer value. 2. Divide the integer by the number of buckets. 3. Interpret the division remainder as the bucket number. 4. Convert the bucket number to the physical address of the block containing the row. - Vv vv Modulo A is a database operation that reads table blocks directly, without accessing an index. - /V¥ Table Scan An is a database operation that reads index blocks sequentially, in order to locate the needed table blocks. - YV¥ Index Scan also called filter factor or selectivity, is the percentage of table rows selected by a query. When a SELECT query is executed - /VV Hit Ratio