Relational Database

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Name three relational algebra operations. A. Selection, projection, and union B. Square root, exponentiation, and logarithm C. Integration and differentiation

A. Selection, projection, and union Relational algebra is based on mathematical operations of set theory. The algebra includes selection, projection, union, and several other set operations.

Which of the following are equivalent to the relational tuple (TR, Turkey, Ankara)? Select all that apply. A. (Ankara, Turkey, TUR) B. (Turkey, TR, Ankara) C. (Turkey, Ankara, TUR) D. (TUR, Ankara, Turkey)

B. (Turkey, TR, Ankara) A relational tuple has no inherent order, so all relational tuples of TR, Turkey, and Ankara are the same. However, the value TUR is not in the relational tuple (TR, Turkey, Ankara).

How many values may appear in each cell? A. Any number of values B. Exactly one value C. No values or one value

B. Exactly one value Tables must be normalized, so only one value may appear in each cell.

Where are duplicate column names allowed? A. Within a single table. B. In different tables. C. Never.

B. In different tables Duplicate column names are not allowed within the same table, but are allowed in different tables. Programmers can distinguish identical column names in different tables by adding the table name as a prefix to a column name.

How often do column names and data types change? A. Never B. Occasionally C. Often

B. Occasionally The database administrator can change column names and data types, but this may affect programs that use the database, and does not happen often.

What was the initial impediment to commercial adoption of relational databases in the early 1980s? A. Reliability B. Processing Speed C. Cost

B. Processing Speed Early relational products were not as fast as more established non-relational products. However, as relational databases matured, processing speed rapidly caught up with non-relational databases.

Which terms are commonly used in relational database processing? A. Tuple, Relation, Attribute B. Row, Table, Column C. Record, File, Field

B. Row, Table, Column The most commonly used terms in relational database are row, column, and table. Occasionally tuple, relation, attribute and record, file, field are also used.

A table with a simple primary key must be in what normal form? A. First normal form only, and no higher B. Second normal form or higher C. Third normal form

B. Second normal form or higher Non-key columns always depend on the primary key. If the primary key is simple, non-key columns necessarily depend on the whole primary key, and therefore the table must be in second normal form.

The relational model was originally developed for which types of applications? A. Big data storage and analysis B. Transactional applications like banking and airline reservations C. Desktop applications with small databases

B. Transactional application like banking and airline reservations At the time the relational model was designed, transactional applications were most important. Today, most transactional systems like banking and airline reservations are built on relational databases.

Which choice is a cell value? A. ID B. Elsa Brinks C. 30500

C. 30500 A cell is a single column of a single row. 30500 occupies the cell in the Salary column of the second row.

What is the result of a relational operation? A. A row B. A column C. A table

C. A table All relational operations result in a table. The result table is not stored in the database but has the same structure as stored tables

How can driver's license information be added to the Employee table? A. Driver's licenses cannot be added, since the Employee table already has an ID column. B. By creating another column named ID. C. By creating another column with a new name, such as ID2 or DriverLicense.

C. By creating another column with a new name, such as ID2 or DriverLicense A table may have several columns with similar information, as long as the column names are different.

In the relational data structure, which components are named? A. Domain, Tuple, Relation B. Domain, Relation C. Domain, Relation, Attribute

C. Domain, Relation, Attribute Domain, relation, and attribute are all named. Tuples are not named.

In the Bonus column of the Lisa Ellison row, what does the zero represent? A. Lisa Ellison's bonus is unknown. B. Lisa Ellison is not eligible for a bonus. C. Lisa Ellison has earned no bonus.

C. Lisa Ellison has earned no bonus Zero is a valid bonus amount. Zero is not the same as unknown or inapplicable data.

What are the components of a column? A. Name only B. Data type only C. Name and data type

C. Name and data type A column has both a name and a data type. The name and data type are specified in the SQL language when a table is created.

Which choice is a column name? A. 6381 B. Sam Snead C. Salary

C. Salary Salary is the name of the third column of the Employee table. Column names are highlighted and appear in the top row of a table.

If the Department column is designated NOT NULL, what happens when a user attempts to insert a new employee without a department value? A. The database accepts the insert and stores a blank string as the Department name. B. The database accepts the insert and saves NULL in the column. C. The database rejects the insert.

C. The database rejects the insert A database does not accept an insert with missing Department data. The insert statement fails.

What does the principle of data independence state? A. The performance of a query is not related to the physical organization of data. B. Data in each row is independent of data in all other rows. C. The result of a database query is not affected by the physical organization of data on storage devices.

C. The result of a database query is not affected by the physical organization of data on storage devices In relational databases, query results are not dependent on physical storage. This allows database administrators to tune storage for optimal performance at any time.

How does a database administrator specify column names and data types? A. In a special file managed by the database administrator B. With the Python language C. With the SQL language

C. With the SQL language The SQL language contains statements to define and change column names and data types for relational databases.

Which Database is relational? A. DB2 B. IDMS C. MongoDB

DB2 DB2 is one of the first relational databases, released by IBM in the early 1980s.

The CHAR data type represents a variable string of characters. True or False?

False CHAR is a string of characters of fixed length. The number of characters is usually specified along with the data type. Ex: CHAR(6) represents strings of six characters.

Delete cascade is an example of a structural rule. True or False?

False Delete cascade is a business rule, not a structural rule. The delete cascade rule requires that, when a row is deleted, all related rows are also deleted. Deleting related rows depends on business policy, and may apply to rows in some tables but not others.

In a first normal form table, non-key columns depend only on the primary key. True or False?

False In a first normal form table, non-key columns may depend on other non-key columns.

Must a table have at least one row? Yes or No

No A table without rows is called an empty table.

In a table that never contains duplicate rows, non-key columns always depend on the primary key. True or False

True A table that never contains duplicate rows always has a primary key. Since primary keys are unique, primary key values cannot be repeated. Consequently, each primary key value relates to at most one value of a non-key column.

A binary data type stores data as an exact copy of computer memory. True or False?

True A value stored in binary format is an exact copy of computer memory. With other data types, such as decimal, the database often converts the computer memory to a different format.

Unique primary key is an example of a structural rule. True or False?

True All relational tables should have a column with unique values, called the primary key. The primary key is used to identify individual rows. Creating tables without a primary key usually causes business problems.

Data in a relational database can violate relational rules. True or False?

True Depending on how tables are specified, some relational rules can be violated. Ex: A table with no primary key can be created. However, rule violations often create business problems and should normally be avoided or automatically prevented.

In principle, all tables are in first normal form. True or False?

True In the relational model, as defined by E. F. Codd, a table may not have duplicate rows and therefore must have a primary key. A table with a primary key is necessarily in first normal form.

Some time data types include time zone. True or False?

True TIMESTAMP usually includes time zone. DATE usually does not include time zone. Details vary by database system.

Integrity rules and relational rules are synonymous. True or False?

True The term integrity rules is commonly used for rules that govern valid data. This material uses the equivalent term relational rules.

What does a NULL in the Name column represent? A. Unknown B. Inapplicable C. Either unknown or inapplicable

Unknown Every employee has a name, so NULL indicates the name exists but has not been entered. The name is unknown to the database.

Are these relations the same? { (8, mango, FALSE), (-11, watermelon, FALSE) } { (-11, watermelon, FALSE), (8, mango, FALSE) }

Yes Both relations contain the same tuples. Since a relation is a set, the order of the tuples does not matter.


संबंधित स्टडी सेट्स

Chapter 8: Exercise Metabolism & Bioenergetics

View Set

EDUC 606 Comprehensive Final Exam

View Set

Chapter 4: Entrepreneurship and Lecture

View Set

ENT Part 1 -- Infections of the Throat

View Set

Ap Euro - Midterm 2 Pt. 1, Ap Euro - Midterm 2 Pt. 2

View Set