Computer Science (P.E.Results) Part 5 !!!!!

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

We are developing a sales database. There are three tables which are shown below. Customer orders are represented in invoices. Invoices can be comprised of one or more products. How would you define the relationship between the customer, orders and products? 1. (customer)1-1(invoice)m-1(products). 2. (customer)1-m(invoice)m-m(products). 3. (customer)1-m(invoice)1-1(products). 4. (customer)m-1(invoice)1-m(products).

(customer)1-m(invoice)m-m(products). (customer)1-m(invoice)m-m(products). (customer)1-m(invoice)m-m(products). (customer)1-m(invoice)m-m(products).

Consider the relationship below which models the student-to-lecturer (academic adviser) relationship. It is a strict policy that a student can have one and only one lecturer assigned as an academic adviser and this is a policy that CANNOT be violated. How can this relationship be modeled in a SQL database system ? 1. Create StudentID as the primary key in both the Students and StudentLecturer tables. 2. Create StudentID as the primary key in the Students table and make the StudentID field in the StudentLecturer table a foreign key linked to the StudentID field in the Students table. 3. Combine both the Students and StudentLecturer tables into a single table. 4. Create StudentID as the primary key in both the Students and StudentLecturer tables. Then, make the StudentID field in the StudentLecturer table a foreign key linked to the StudentID field in the Students table.

Create StudentID as the primary key in both the Students and StudentLecturer tables. Then, make the StudentID field in the StudentLecturer table a foreign key linked to the StudentID field in the Students table.

Which of the following would be a good choice for data found in a primary key? Customer's home city. Customer's bank account number. Customer's favorite food. Customer's first name.

Customer's bank account number. Customer's bank account number. Customer's bank account number. Customer's bank account number. Customer's bank account number.

The Customer table has the following fields: CustomerID, CustomerFirstName, CustomerLastName, CustomerZipCode, and CustomerCityName. Which fields have a transitive dependency? 1. CustomerZipCode and CustomerCityName 2. CustomerLastName and CustomerZipCode 3. CustomerID and CustomerFirstName 4. CustomerLastName and CustomerFirstName

CustomerZipCode and CustomerCityName. CustomerZipCode and CustomerCityName. CustomerZipCode and CustomerCityName. CustomerZipCode and CustomerCityName. CustomerZipCode and CustomerCityName.

What does a foreign key do? 1. Directly identifies another table. 2. Gives access to another entire database. 3. Anything you want it to do. 4. Directly identifies another column.

Directly identifies another table. Directly identifies another table. Directly identifies another table. Directly identifies another table. Directly identifies another table. Directly identifies another table.

When it comes to DBMS, a table in which every field contains only single values, and no identical rows, is said to be: a. 1NF b. unnormalized c. 3NF d. 2NF

First Normal Form or 1NF. First Normal Form or 1NF. First Normal Form or 1NF. First Normal Form or 1NF. Columns must have single values

Which table is in first normal form (1NF)?

Id Customer State Website 1025 Jane Doe AZ Shop.com

_____ specify the actions needed to remove the drawbacks in a DBMS design. 1. Anomalies 2. Transitive dependencies 3. Data modifications 4. Normal forms

Normalization is the process of removing existing or possible incidences of anomalies, data redundancies, and data inaccuracy in a database. Normal Forms. Normal Forms.

In the table below, what best describes the relationship between Book and author age? Book Author Age Python Programming Jane Smith 40 Path of Least Resistance Charles Ohm 45 Java Essentials Cof Fee 92 1. Negative dependency. 2. Partial dependency. 3. Recursive dependency. 4. This is a primary key.

Partial dependency. Partial dependency. Partial dependency. Partial dependency. Partial dependency. Partial dependency. Since you can't know the age of the author unless you know the book title, this is a partial dependency.

What is the main way to absolutely recognize a record within a database? 1. Primary key. 2. Foreign key. 3. Tertiary key. 4. Secondary key.

Primary keys act as absolute identifiers, like an ID number. Primary keys act as absolute identifiers, like an ID number. Primary keys act as absolute identifiers, like an ID number. Primary keys act as absolute identifiers, like an ID number.

What is the main purpose of normalization in a database? Reduce Size. Organize Information. Increase Speed. Reduce Duplication.

Reduce Duplication. Reduce Duplication. Reduce Duplication. Reduce Duplication. Reduce Duplication. Reduce Duplication.

How can the following table be changed to first normal form? 1. Remove the Part_Name field 2. Add a primary key 3. Nothing; it is already 1NF 4. Remove the extra Color field

Remove the extra Color field. Remove the extra Color field. Remove the extra Color field. Remove the extra Color field. Remove the extra Color field. Remove the extra Color field. Remove the extra Color field. Remove the extra Color field.

The normal form in DBMS that does not preserve partial attribute dependencies is: a. 2NF b. All normal forms c. 3NF d. 1NF

Second Normal Form or 2NF. Second Normal Form or 2NF. Second Normal Form or 2NF. Second Normal Form or 2NF.

Consider the relationship shown in the diagram below. It is known that the StudentID is the primary key of the Students table and the CourseID is the primary key of the Courses table. The StudentCourse table stores the relationship between the students and their registered course(s). What is/are the foreign key(s) in the StudentCourse table? 1. StudentID and CourseID. 2. CourseID. 3. Semester. 4. StudentID.

StudentID and CourseID. StudentID and CourseID. StudentID and CourseID. StudentID and CourseID. StudentID and CourseID.

Which of these would likely be used as a foreign key between a table on student enrollment and student grades? 1. Tuition. 2. Student_hometown. 3. Grades. 4. Student_name.

Student_name would be the common column between the two tables. Student_name would be the common column between the two tables. Student_name would be the common column between the two tables. Student_name. Student_name.

A relational database is a set of _____, where each _____ is a record and each _____ is a field. Row, Tables, Column. Column, Tables, Row. Tables, Row, Column. Tables, Column, Row.

Tables, Row, Column. Tables, Row, Column. Tables, Row, Column. Tables, Row, Column. Tables, Row, Column. Tables, Row, Column.

In order for a database to be in second normal form, 2NF, what must be true? 1. All data must be numeric. 2. The database must be in first normal form. 3. There must be more than one primary key. 4. Transitive dependencies must be added.

The database must be in first normal form. The database must be in first normal form. The database must be in first normal form. The database must be in first normal form. A database must first be in 1NF in order to make it 2NF.

Which of the following would be an example of a one-to-one relationship that can be modeled in an SQL database ? 1. The number of passports held by a person. 2. The number of cars owned by a person. 3. The number of courses registered by a student. 4. The relationship between a person and their student identification number.

The relationship between a person and their student identification number. The relationship between a person and their student identification number. The relationship between a person and their student identification number. The relationship between a person and their student identification number.

Why is the following not in 2NF? UserID UserName SiteCode 20 Jane 10 30 Paul 100 25 Sam 55 30 Paul 100 1. Data is numeric. 2. There are duplicate rows. 3. Data is non-numeric. 4. Values for site are too large.

There are duplicate rows. There are duplicate rows. There are duplicate rows. There are duplicate rows. There are two rows that repeat; this is not allowed in database normalization.

Which of the following are possible relationships that can be modeled by an SQL database ? I. one-to-one relationship ( 1: 1 relationship ) II. one-to-many relationship ( 1:N relationship ) III. many-to-many relationship ( N:M relationship ) IV. one-to-x relationship ( 1:x relationship where x can be any number from 2 onwards ) a. II and III b. I, II and IV c. I and II d. I, II and III

d. I, II and III. d. I, II and III. d. I, II and III. d. I, II and III. I. one-to-one relationship ( 1: 1 relationship ) II. one-to-many relationship ( 1:N relationship ) III. many-to-many relationship ( N:M relationship )

Which of the following statements is true about an attribute? 1. related rows in a table. 2. always has a one to one relationship. 3. primary key of the table. 4. data collected about an entity.

data collected about an entity. data collected about an entity. data collected about an entity. data collected about an entity. data collected about an entity. data collected about an entity.

Which of the following is an example of proper naming convention of an attribute? first_name. FirstName. firstname. First_Name.

first_name. first_name. first_name. first_name. first_name. Proper naming convention deems that attributes consist of lower case letters and words separated by an underscore

From which class(es) of data are primary keys most often made? i. Character ii. Number iii. Symbol iv. Time a. ii and iii. b. i and ii. c. i, ii, iii, and iv. d. iii and iv.

i and ii. i and ii. i and ii. i and ii. i and ii. i and ii. primary keys often are made of characters and numbers. primary keys often are made of characters and numbers

A table is considered to be in third normal form when it is in second normal form and _____. it doesn't have transitive dependency among columns. it isn't externally dependent. there are no more than ten fields. all fields are of the same data type.

it doesn't have transitive dependency among columns. it doesn't have transitive dependency among columns. it doesn't have transitive dependency among columns. it doesn't have transitive dependency among columns. it doesn't have transitive dependency among columns.

The normal form in DBMS that does not preserve partial attribute dependencies is: 1NF. All normal forms. 3NF. 2NF.

second normal form 2NF. second normal form 2NF. second normal form 2NF. second normal form 2NF. second normal form 2NF. second normal form 2NF.

Consider the following Table and its attributes: Drinks Table (Drink Name, Quantity, Alcoholic?) What data types would you assign to the attributes respectively? 1. string, date/time, string 2. string integer date/time 3. string, integer, Boolean 4. integer, integer string

string, integer, Boolean. string, integer, Boolean. Drink name - Names can consist of letters, numbers or both; a string data type is assigned. Quantity - Quantity indicates a numeric value; an integer data type is assigned. Alcoholic? - The ? indicates a yes/ no answer; a Boolean data type is assigned.

How would you remove the following transitive dependency for the table Customer, with fields CustomerID, CustomerCity, and CustomerZipCode? 1.Create a new table called CustomerLocation. Add CustomerZipCode and CustomerCity. In the original Customer table, CustomerZipCode is a foreign key to the new table. 2.Create a new table called CustomerLocation. Add CustomerID as the primary key. Add CustomerCity as a foreign key in the original Customer table. 3.Create a new table called Customer2 and add all fields. Join on Customer ID. 4.Create a new table called CustomerZip and add only the zip code.

1. Create a new table called CustomerLocation. 2. Add CustomerZipCode and CustomerCity. 3. In the original Customer table, CustomerZipCode is a foreign key to the new table.

Which of the following is true about a database table? 1. It must contain at least one row, or tuple. 2. It can contain zero tuples. 3. All rows must be in alphabetical order to be considered a table. 4. Each field in a tuple must always contain data.

A database table can contain zero or more rows, or tuples. A database table can contain zero or more rows, or tuples. A database table can contain zero or more rows, or tuples. A database table can contain zero or more rows, or tuples. A database table can contain zero or more rows, or tuples.

What is the basic definition of a primary key? A naming convention that uses all lowercase letters. A tuple that contains exact matches. A key secondary to the first. A unique identifier.

A unique identifier. A unique identifier. A unique identifier. The primary key is considered a unique identifier in that it indicates a field that is intended to contain a value that cannot be duplicated.


Kaugnay na mga set ng pag-aaral

U.S History Unit 3 Summer School

View Set

Nissan Intelligent All Wheel Drive

View Set

NUR 300: Chapter 36: Spiritual Health

View Set

Homeowners Insurance: Section I of the HO-3

View Set