12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet Home > Science > Computer Science > Databases Database Theory Test 2 Leave the first rating STUDY Flashcards Learn Write Spell Test Play Match Upgrade to remove adverts Only US$2.99/month Creat killi Terms in this set (150) Anamoly An error or inconsistency that may result when a user attempts to update a table that contains redundant data. The three types of anomalies are insertion, deletion, and modification anomalies. Which type of entity cannot Weak Entity exist in the database unless another type of entity also exists in the database, but does not require that the identifier of that other entity be included as part of its own identifier? https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 1/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet Which type of entity has its Subtype Entity relationship to another entity determined by an attribute in that other entity called a discriminator? A relation is in which normal Fourth Normal Form form if it is in BCNF and has no multivalued dependencies? What is a synonym for tuple in a Row relational database? What is a determinant? The attribute on the left-hand side of the arrow in a functional dependency. What is the term for a group of Primary Key one or more attributes that uniquely identifies a tuple? What is a relation? A named two-dimensional table of data of rows and columns. A tuple has a relation schema, but an entire database has a relational schema. In the relational model, how are Structures, Operations, Integrity Rules. A relation is a relationships between relations set of tuples. A tuple is an unordered set of attribute created? values. What is a functional A constraint between two attributes or two sets of dependency? attributes What is a partial functional A functional dependency in which one or more dependency? nonkey attributes are functionally dependent on part, but not all, of the primary key. What is an example of an Information appears in multiple rows so may get update anomaly? logical inconsistencies. Ex: For Employee skills table might contain EmployeeID, Employee Address, and Skill so a change in address for a certain employee may have to be applied to multiple records. Upgrade to remove adverts Only US$2.99/month What anomalies does Update Anomaly, Insertion Anomaly, Deletion normalization to third normal Anomaly form help avoid? What does a primary key The relation uniquely identify? https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 2/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet What is it called when the value Partial Functional Dependency for a non-key attribute of a relation is dependent on the value of some part of the relation's primary key, but not all of it? Check the order entry example, With a /subtotal meaning that it is a derived attribute how is the derived attribute subtotal indicated in the association class OrderLine in a class diagram? What type of key is UPC An external key we will use as the primary key for our (Universal Product Code) in the products table OrderLines and Products tables? What is the purpose of the We have to know the dateTimeOut in order to pair a dateTimeOut attribute in the customer with the same book more than once. We library loan pattern? and what is can call this a discriminator attribute, since it allows us this type of attribute called? Is it to discriminate between the multiple pairings of part of the Loans Primary Key? customer and book. What does the notation X→Y Y is functionally dependent on X indicate? What is an example of a sub When we have an attribute or set of attributes that key? What does this mean in a are a super key for some of the other attributes in the relation? relation, but not a super key for the entire relation. An example would be zip code How would you model the Phone 0...*: Phone Number (phoneType)(number) repeated attribute phone number in a Contacts database? Oracle doesn't have a boolean Oracle developers typically use a CHAR(1) data type, data type. How do Oracle and assign it values of 'T' or 'F'). developers typically indicate a 'Y' or 'N', 'T' or 'F' value? Upgrade to remove adverts Only US$2.99/month What is an enumerated domain? Attribute domains that may be specified by a well- How would you store the defined, reasonably-sized set of constant values are domain values? called enumerated domains. PKs and FKs link them to other tables as always. What SQL pattern is used to SELECT Employees, Managers produce a list of employees and FROM _____; their managers? What do E.lastname means the last name for all the employees https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 3/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet E.lastName and M.lastName in the employees table. M.lastname is the same as for mean in the query? employees. What is the "key to successful Is to make sure that end users of the system never denormalization"? have to manually duplicate or maintain the redundant data. 1.In the following reduced form Emp_ID or shorthand notation EMPLOYEE(Emp_ID, Name, Dept_Name, Salary). What is the primary key for the table? What is the purpose of physical Translate the logical description of data into the database design? technical specifications for storing and retrieving data What do we call a primary key Enterprise Key whose value is unique across all relations? What are major advantages of 1.Efficiency: Records used together are grouped partitioning? together 2.Local optimization: Each partition can be optimized for performance 3.Security, recovery 4.Load balancing: Partitions stored on different disks, reduces contention What is a common hashing It's usually a division remainder to determine a record algorithm? Explain. position by dividing each primary key by a suitable prime number and then using the remainder of the division as the relative storage location. Eg. If there are 1000 employees, then closest prime number is 997. Now if an employee has a record of 12396, then we divide this by 997 to get 443 which is stored on file. 11.How does horizontal Horizontal Partitioning- distributing the rows of a partitioning differ from vertical table into several separate files partitioning? - Useful for situations where different users need access to different rows Vertical Partitioning - dist the columns of a table into several separate files - Useful for situations where diff users need access to diff columns; (primary key must be repeated in each file) https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 4/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet What is the most common form RAID 5 is most common. of RAID in use today? What is RAID 5? RAID 5 offers the advantages of data storage redundancy along with a high level of performance. It works differently from RAID 0 or 1 by using striping and parity. (striping - dist small segments of data across a number of hard drives) (parity - technique that allows data to be reconstructed from the remaining hard drives in the system if one drive fails) What does the acronym RAID RAID is Redundant array of independent skills. This is mean? a set of disk drives that appear to the user to be a single disk drive. 1.Relation: Ex: Select e.LastName AS Employee, mLastName AS Employees(EmployeeID,Employ Manager eeName,ManagerID) FROM employees e INNER JOIN employees m ON (e.Manager_ID = m.Manage_ID) data 61 Sue Smith (null) 62 David Jones 61 63 Troy Parker 61 64 Claire Smith-Jones 63 65 Grover Rivers 63 What employees are managers? What are the benefits of a 1.Standards are the same across the system which standardized relational means there is less adaptability needed in terms of language? skills for users 2.It also improves productivity because there is less time required for learning the skill of a new language every time when you have a new system. 3.Reduce dependence in a single vendor What is the purpose of SQL The purpose of SQL is to provide an interface to a standard? relational database such as Oracle Database, and all SQL statements are instructions to the database. What researcher defined the Edgar F. Codd relational data model? How does third normal form Second Normal Form is in first normal form and gets differ from second normal rid of partial functional dependencies. Whereas third form? Explain. https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 5/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet normal form has no transitive functional dependencies. What type of integrity constraint Referential Integrity Constraint maintains consistency among the rows of two relations? What is a well-structured Any relation that contains minimal redundancy and relation? allows users to insert, modify, and delete the rows in a table without anomalies, errors or inconsistencies If an identifier is not assigned to The default primary key is the two primary attributes the relation formed from the from the other two relations. associative entity, what is the default primary key? What is the relationship A determinant is any attribute that you can use to between determinants and determine the values assigned to candidate keys? Is there one? other attribute(s) in the same row. And a candidate key is an attribute, or combination of attributes, that uniquely identifies a row in a relation. Hence, we can say that a candidate key is always a determinant but a determinant is not always the candidate key. When is a relation in first normal A relation that has a primary key and in which there form? What criteria must be are no repeating groups. met? What is the main motivation for Make it easier to search creating an enterprise key for a database? What is an attribute in a relation Foreign Key of a database that serves as the primary key of another relation in the same database is called? What two conditions must a Attribute has to be unique and it has to identify a row candidate key satisfy? in a relation. What is a functional Partial Functional Dependency dependency between two or more nonkey attributes called? In an SQL statement, which Where parts states the conditions for row selection? What does the following SQL This brings out all of the records from the 'Customer' statement do? Select * From table where the 'cust_type' f field is Best. Customer Where Cust_Type = 1)It is selecting all attributes "Best"? 2) From the customers table 3) And they have to be of the customer type best. https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 6/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet What is the difference between Count( ) and Count (*) are the same as it both counts the functions Count( ), Count(*) the number of records in a table. Eg. and COUNT DISTINCT? Select Count(*)/( ) AS NumberofCustomers from Customers adds up all the customers from customer table. Count Distinct totals up unique customers in a table i.e. it doesn't one customer twice from a record What qualifier is used in the SQL Distinct Select command to eliminate duplicate rows in a query? What are the 3 primary Selection - Filters the rows Relational Algebra operators? Projection - Shows columns you want Join - Join tables together Upgrade to remove adverts Only US$2.99/month When is an outer join used When you want rows that do not have matching instead of a natural join? values in common columns are nonetheless included in the result table Is the SQL SELECT the same as Yes the selection operator in relational algebra? What happens when you issue If WHERE clause is not present, all records will be the DELETE FROM tablename deleted command without specifying a WHERE condition? What is the purpose of the SQL It is used for aggregate functions b/c WHERE does HAVING clause? not work with aggregate functions What is a Self Join in SQL? A relation that is joined to itself Ex: Select e.LastName AS Employee, mLastName AS Manage FROM employees e INNER JOIN employees m ON (e.Manager_ID = m.Manage_ID) What is Relational algebra? A formal system for manipulating relations What command is used to DELETE delete a table from a database? What does the SQL CASE Allows you to return varying results based upon the statement do? evaluation of expressions. You can use a CASE https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 7/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet statement anywhere within a SQL statement that you would normally include an expression. SQL CASE is a very unique conditional statement providing if/then/else logic for any ordinary SQL command, such as SELECT or UPDATE. In Oracle DBMS what is the PL/SQL language that has all of the conditional (IF ...THEN) looping (WHILE), assignment, variable declaration and other language constructs called? What are the "left" and "right" Left table is the first table and right is the second tables in an outer join? table. How does a Full Outer join differ Union includes all columns from each table that is from a Union join? joined, and an instance for each row of each table, while a Full Outer join is a join in which rows that do not have matching values in common columns are nonetheless included in the result table. What is an alternate name given Relation or Attribute to a column or table in any SQL statement called? What is the goal of database To have a well-structured relation containing minimal normalization? data redundancy and allows users to insert, delete, and update rows without causing data inconsistencies or anomalies. What is a foreign key? An attribute in a relation that serves as the primary key of another relation in the same database. An identifier that enables a dependent relation (on the many side of a relationship) to refer to its parent relation (on the one side of the relationship). . Which of the following CASE D expressions says if a Score is 60 or above it's a "Pass" or below 60 it's a "Fail"? A. CASE IF n >= 60 THEN 'Pass' OR n < 60 THEN 'Fail' B. CASE IF n >= 60 THEN 'Pass' ELSE 'Fail' C. CASE IF n >= 60 THEN 'Fail' OR n < 60 THEN 'Pass' D. CASE WHEN n >= 60 THEN 'Pass' ELSE 'Fail' https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 8/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet Which SQL statement will select C all rows from a table called "Employee" and orders the results by "Employee_Name" A. SELECT * FROM Employee ORDER Employee_Name; B. SELECT * FROM Employee ORDER ON Employee_Name; C. SELECT * FROM Employee ORDER BY Employee_Name; D. SELECT * FROM Employee ORDERED Employee_Name; What are the requirements for a Requirements for a table to qualify as a relation: table to qualify as a relation? 1. Table must have a unique name. 2. Every attribute value must be atomic (not multivalued, not composite) 3. Every row must be unique 4. Attributes (columns) in tables must have unique names 5. Order of columns is irrelevant 6. Order of rows is irrelevant What would we call a functional Partial Functional Dependency dependency between two (or more) non-key attributes? In 1986, what organizations American National Standards Institute adopted SQL as a standard? A relation that has no Second Normal Form multivalued attributes, but does have partial functional or transitive dependencies is in what normal form? https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 9/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet What is the attribute on the left- Determinant hand side of the arrow in a functional dependency called? 9. A row or tuple has a 9. A row or tuple has a ____Relation___ schema, but an ____Relation___ schema, but an entire database has a __Relational_____ schema. entire database has a __Relational_____ schema. What operations are classified Create, Read, Update, Delete, Select as Data Manipulation Language (DML)? What records does a full outer The FULL OUTER JOIN keyword returns all the rows join return? from the left table (Customers), and all the rows from the right table (Orders). If there are rows in "Customers" that do not have matches in "Orders", or if there are rows in "Orders" that do not have matches in "Customers", those rows will be listed as well. What type of join can be further Inner join classified as an equi-join, natural join, or cross-join? What is the Data Definition SQL commands to define a database (schema), Language (DDL) used for? including creating, altering, and dropping tables and establishing constraints. What data type is most VARCHAR appropriate for a character string that is a fixed-width ncharacter string, padded with spaces as needed? What is a primary key whose Enterprise Key value is unique across all relations called? What is horizontal partitioning? Distribution of the rows of a logical relation into several separate tables. What is the SQL equivalent of Create, Read, Update, Delete the CRUD acronym? What are the various types of Bitmap index --> stores most of its data as bit arrays indexes? Dense index --> An index record appears for every search key value in file - Hash index Sparse index --> Index records are created only for some of the https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 10/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet records. Reverse key index --> reverses the key value before entering it in the index of its data as bit arrays, e.g., the key value 24538 becomes 83542 in the index. Reversing the key value is particularly useful for indexing data such as sequence numbers What theoretical RAID level is RAID 2 not used in practice? What is the purpose for building To help get more detail and communicate with a logical data model? people like DBA's. Using business terms for relations and attributes provides us with common normalized set of relations. What is the difference between Third normal form has no transitive dependencies no second normal form and third non key fields are trasitively dependent upon the key normalization form? fields. What are the three anomaly 1) Insert Anomaly 2) Update Anomaly 3) Delete types that are avoided by Anomaly normalizing the database? The selection, or restriction, Select and Where clause operation retrieves tuples from a relation, limiting the results to only those that meet a specific criteria. The SQL equivalent of selection is the ______ query statement with a ________ clause. What are the two parts of the Physical and Logical internal schema? What are positive Provide faster direct data access attributes/advantages of indexing? What are the basic statements Create, Alter, Drop of DDL? What is the SQL to list the finish SELECT Product_Finish AS 'Finished Product', and standard price for all desks Standard_Price AS 'Standard Price' with a Standard_Price greater FROM Product than $300 in the PRODUCT WHERE Standard_Price>300 AND table? (Note: desk is a product Product_Description = 'Desk'; description). How many orders did each SELECT Customer.Customer_Name, Order.Order_ID customer place in August 2014? FROM Customer https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 11/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet What type of join would you FULL OUTER JOIN Orders use? ON Customer.Customer_ID=Order.Customer_ID ORDER BY Customer.Customer_Name; What is the SQL to list all SELECT Customer_Name AS 'Customer Name', State; customers who live in Eastern FROM Customer US states of "FL", "NY", "NY"? List WHERE State = 'FL' OR State= 'NY' the customers alphabetically by ORDER BY State, Customer_Name; state and alphabetically by customer within each state. How would you list the SELECT Customer_ID, Customer_Name Customer_ID and FROM Customers Customer_Name for all ORDER BY Customer_Name; Customers in alphabetical order? T/F A candidate key is always a T determinant, but a determinant may or may not be a candidate key. T/F A relation is in first normal F form when there are no repeating groups in the relation and there is only one determinant of the relation. An equi-join is a join in which F one of the duplicate columns is eliminated in the result table. An SQL query that implements T an outer join will return rows that do not have matching values in common columns. One of the original purposes of T the SQL standard was to provide a vehicle for portability of database definition and application modules between conforming DBMSs. A database table is defined T using the data definition language (DDL). The WHERE clause is always T processed before the GROUP BY clause when both occur in a SELECT statement. https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 12/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet A default value is the value that T a field will always assume, regardless of what the user enters for an instance of that field. A hashing algorithm is an T algorithm that converts a primary key value into a relative record number. Indexes are most useful for F columns that frequently appear in WHERE clauses of SQL commands, either to qualify the rows to select or for linking. There can be multivalued F attributes in a relation in 3rd Normal Form. The columns of a relation can T be interchanged without changing the meaning or use of the relation. A cascading delete removes all T records in other tables associated with the record to be deleted. A partial functional dependency T is a functional dependency in which one or more non-key attributes are functionally dependent on part (but not all) of the primary key. An enterprise key is a foreign F key whose value is unique across all relations. T/F A natural join is the same as T an equi-join, except that it is performed over matching columns that have been defined with the same name and one of the duplicate columns is eliminated. The original purpose of the SQL T standard was to provide a means for portability of database definition and https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 13/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet application modules between conforming DBMSs. If a column or set of columns is F(only primary key) designated as UNIQUE, that column or set of columns is a primary key or a foreign key. SQL is a record-oriented F it is a set oriented language language. In a 1:M relationship, the primary T key attribute of the entity on the one-side of the relationship becomes a foreign key in the relation on the many-side. The last SQL statement to T execute is ORDER BY. The SQL HAVING clause acts T like a WHERE clause, but it identifies groups that meet a criterion, rather than rows. SQL is a nonprocedural F language and no statement execution sequence is implied. A correlated query requires that F a value be known from the inner query to process the outer query. The order of columns of a F relation can NOT be interchanged without changing the meaning or use of the relation. candidate key An attribute, or combination of attributes, that uniquely identifies a row in a relation. composite key- A primary key that consists of more than one attribute. Data Definition Language Commands used to define a database, including (DDL)- creating, altering, and dropping tables and establishing constraints. Data Manipulation Language Commands used to maintain and query a database, (DML) including updating, inserting, modifying, and https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 14/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet querying data. denormalization Process of transforming normalized relations into non-normalized physical record specifications. determinant The attribute on the left-hand side of the arrow in a functional dependency (A -> B). A determinant in a database table is any attribute that you can use to determine the values assigned to other attribute(s) in the same row. dynamic view A virtual table that is created dynamically upon request by user. A dynamic view is not a temporary table. Rather, its definition is stored in the system catalog and the contents of the views are materialized as a result of an SQL query that uses the view. Its differs from a materialized view, which may be stored on a disk and refreshed at intervals or when used, depending on the RDBMS. equi-join Specific type of comparator-based join that uses only equality comparisons in the join-predicate. entity integrity rule enterprise key Primary keys that are unique in the whole database, not just within a single relation. foreign key- An attribute in a relation that serves as the primary key of another relation in the same database. An identifier that enables a dependent relation (on the many side of a relationship) to refer to its parent relation (on the one side of the relationship). functional dependency- A constraint between two attributes (or two sets of attributes) in which the value of one attribute is determined by the value of another attribute. A functional dependency occurs when one attribute in a relation uniquely determines another attribute. This can be written A -> B which would be the same as stating "B is functionally dependent upon A." For example, in a table listing employee characteristics including Social Security Number (SSN) and name, name is functionally dependent upon SSN (or SSN -> name) because an employee's name can be uniquely determined from their SSN. However, the reverse statement (name -> SSN) is not true because more than one employee can have the same name but different SSNs hashed file organization- address for each row is determined using an algorithm. hashing algorithm Usually division-remainder to determine record position, e.g., dividing each primary key value by a https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 15/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet suitable prime number and then using the remainder of the division as the relative storage location. Records with same storage location are grouped in lists. index Is a sorted list of pointers stored along with the actual data. It's additional physical file. A table or other data structure used to determine the location of records in a file that satisfy some condition. materialized view Copies or replicas of data based on SQL queries created in the same manner as dynamic views are. However, a materialized view exists as a table and thus care must be taken to keep it synchronized with its associated base tables normal form A state of a relation. Each normal form has rules regarding relationships between attributes (or functional dependencies) that must be satisfied. normalization Normalization is the process of organizing the fields and tables of a relational database to minimize redundancy. outer join The FULL OUTER JOIN keyword returns all rows from the left table (table1) and from the right table (table2). partition a division of a logical database or its constituting elements into distinct independent parts. Database partitioning is normally done for manageability, performance or availability reasons. Horizontal partitioning Distribution of the rows of a logical relation into several separate tables. Vertical partitioning Distribution of the columns of a logical relation into several separate physical tables. physical database design Is the process of translating a logical description of data into technical specifications for storing and retrieving data. physical file- A named portion of secondary memory allocated to store physical records. primary key An attribute or a combination of attributes that uniquely identifies each row in a relation. RAID RAID (redundant array of independent disks; originally redundant array of inexpensive disks) is a https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 16/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet way of storing the same data in different places (thus, redundantly) on multiple hard disks. recursive foreign key A foreign key in a relation that references the primary key values of the same relation. referential integrity constraint A rule that states that either each foreign key value must match a primary key value in another relation or the foreign key value must be null. Relation named two-dimensional table of data. transitive dependency A functional dependency between the primary key and one or more nonkey attributes that are dependent on the primary key via another nonkey attribute. well-structured relation Any relation that contains minimal redundancy and allows users to insert, modify, and delete the rows in a table without anomalies, errors or inconsistencies. See More THIS SET IS OFTEN SAVED IN THE SAME FOLDER AS... SQL 70-461 Objectives - Set 4 111 terms 71 terms mmanz1994 pseudofission SQL PracticeWrite a SQL Server 2016 Terminology 10 terms 1,751 terms francescaross https://quizlet.com/55431986/database-theory-test-2-flash-cards/# lisab920 17/18 12/6/2020 Best Database Theory Test 2 Flashcards | Quizlet https://quizlet.com/55431986/database-theory-test-2-flash-cards/# 18/18