Answered step by step
Verified Expert Solution
Question
1 Approved Answer
needed a bit of help on the ones I got wrong or why I got them wrong I wasnt given an ER diagram to do
needed a bit of help on the ones I got wrong or why I got them wrong
I wasnt given an ER diagram to do this. this was all the information I received.
Question 1 0/2 points In order to be used as a primary key, which of these characteristics must an attribute possess with respect to a single instance of the entity? Select all that apply. There must be a maximum of one attribute instance, There must be many instances of the attribute, There must be at most one entity instance that each attribute instance describes. There must be at least one instance of the attribute There must be zero or more instances of the attribute. - Hide Feedback In order to be used as a primary key during the extraction of data from a database, an attribute must be singular, regular, and unique. With respect to a single entity instance, an attribute is termed singular when there is a maximum of one attribute instance. An attribute is unique when each instance of it describes at most one entity instance. It is a required attribute if there needs to be at least one instance of it. Question 3 0/2 points Relationship names and types of relationship maxima or minima that each could have are listed below. Match each relationship in the list below to the type of relationship maxima or minima. Instructions: Choose your responses from the drop-down menus below. Response options cannot be used more than once. 2 Minima is One-Zero 1. Person-Assigned-SocialSecurity Number 1 Maxima is One-One 2. CubicleNumber-Assigned-to-Employee 3. Maxima is One-Many 3. Birthdate-Recorded-for-a Person 4. Minima is Zero Zero 4. Women-Bearing Children Hide Feedback In the relationship Person-Assigned-SocialSecurity Number, the maxima is one-one because we know that one person can only be assigned one social security number and vice-versa. For the relationship CubicleNumber-Assigned-to-Employee, the maxima is one- many: In a workplace that runs on shifts, the same cubicle number may be assigned to many employees, but each employee may only be assigned to one cubicle number. For the relationship Birthdate-Recorded-for-a Person, the minima is one-zero because the minimum number of persons born on a date may be zero but each person born has at least one recorded birthdate. Finally, for the relationship Women-Bearing-Children, the minima is zero-zero because there may be no women at all who are pregnant, so no children may be born. Question 4 0/2 points A ride-sharing app's discount system for riders is configured such that a ride discount is triggered only if at least two RiderlDs book a ride in the same Carld at the same time. Which of the following is true of the relationship Ride Discount-is-Applicable? Select one. The relationship maximum is One-Two. The relationship minimum is One-Two. The relationship minimum is Many-One. The relationship minimum is Two-One. Hide Feedback The relationship minimum for Ride Discount-is-Applicable is One-Two given the business rule described. For the ride discount to be triggered, the same Card must receive a booking from at least two RiderlDs at the same time. At least two RiderlDs are required to book with one Carld. Question 5 0/2 points Your professor is advising a new crowd-funding app for women's self-help groups (SHGs) in Latin America on their database architecture. This is the business requirement she has worked on: All campaigns belong to a SHG. An SHG must exist before a campaign is created, and when an SHG is deleted from the database, all its campaigns are deleted. SHGs always belong to a country, and a country must be added to the app before SHGs are added to it. Which of the following is true of the entities defined in the database? Select all that apply. An SHG entity depends on a Campaign entity. An SHG is a Master entity for a Campaign. A Campaign entity is a Master entity for an SHG. A Country is an Independent entity. An SHG entity is dependent on a Country entity. A Campaign is an Independent entity. Hide Feedback According to the business requirements, an SHG must be created before a campaign can be created, which makes an SHG a Master entity for a Campaign. In addition, an SHG cannot be created unless a Country is already present; this means an SHG entity is dependent on a Country entity. Finally, it's clear from the requirements that a Country exists independent of any other entity. Question 6 0/2 points Your nephew, who is a junior in high school, has been asked to work on a database for NBA teams. The following are the requirements he has been given: All teams play in the Eastern Conference or the Western Conference. Teams in each conference are named for cities or states. Some teams have moved from one conference to another. He asks for help in defining entities and attributes. Which of the following would you advise? Select all that apply. NBA as supertype with Conference as subtype Conference as subtype under Team as supertype Team as subtype under Conference as supertype City and State as subtypes under Team as supertype TeamMoved as attribute of Conference subtype CityName as attribute of Team supertype Hide Feedback A Team is a supertype entity because it is the basic unit of the NBA. A Conference is a subtype entity of the Team entity because a Conference consists of a subset of all teams in the NBA. Teams named for a City or State are other subsets of all teams. so City and State are subtype entities under Team as supertype. A Team may be named for a City, so City Name is an attribute of the supertype entity Team. A Team may have moved from one Conference to the other, so TeamMoved is an attribute of the Conference subtype entity. Question 7 If you wanted to delete the column ChildAge from the table Children, which statement should you use? Select one. 0/2 points O ALTER TABLE Children DROP ChildAge: DELETE TABLE Children DELETE ChildAge: O ALTER TABLE Children DELETE ChildAge; O DELETE TABLE Children DROP ChildAge: Hide Feedback In our example, ALTER TABLE Children DROP ChildAge will result in the column ChildAge being deleted from the table Children. Remember that the ALTER TABLE statement can be used to add, modify, or delete table columns. You do so by specifying the table name followed by a clause that indicates what is to be altered; if a column is to be deleted, this clause is DROP. Question 8 2/2 points ON UPDATE or ON DELETE keywords specify action on the FOREIGN KEY constraint on a table and must be followed by one of four keywords that respond in a specific manner under certain conditions. These four keywords and the purpose of each are listed in the table. Match each keyword to its purpose. Instructions: Choose your responses from the drop-down menus below. Response options cannot be used more than once. Rejects an insert, update, or delete that violates -referential integrity 1. RESTRICT -- 2. SET NULL 2 Sets an invalid foreign key value to NULL 3. SET DEFAULT Propagates primary key changes to related foreign keys | 4. CASCADE 3 Sets invalid foreign keys to a default primary key value Hide Feedback When you use ON DELETE or OR UPDATE keywords to specify actions on the FOREIGN KEY, you need to provide keywords that respond in a specific manner under certain conditions. RESTRICT rejects an insert, update, or delete that violates referential integrity; it is applied by default if no action is specified. SET NULL sets an invalid foreign key value to NULL whereas SET DEFAULT sets invalid foreign keys to a default primary key value. CASCADE propagates primary key changes such as deletions or updates to related foreign keys. Question 9 072 points Preparing for a hackathon at his high school, your cousin messages you the following code snippet for an app-based service targeted at high school students: CREATE TABLE Limos Code TINYINT UNSIGNED, Name VARCHAR(20), Driverid SMALLINT UNSIGNED, PRIMARY KEY (CarlD). FOREIGN KEY (Driver), REFERENCES Cars (CarModel)); The CarModel column referenced in the last line is the primary key of another table named Cars. Because there were some errors in the Cars table, he has written a DROP TABLE Cars statement but is puzzled why it won't work. What do you think he needs to do? Select one. Write a DROP TABLE Limos statement to first delete the table Limos. Use an ALTER TABLE Cars statement to delete the table Cars. Use an ALTER TABLE Limos statement to first delete the table Limos. Add an ON UPDATE CASCADE statement after FOREIGN KEY statement for Limos. Name VARCHAR(20), DriverlD SMALLINT UNSIGNED, PRIMARY KEY (Card) FOREIGN KEY (DriverID), REFERENCES Cars (CarModel)); The CarModel column referenced in the last line is the primary key of another table named Cars. Because there were some errors in the Cars table, he has written a DROP TABLE Cars statement but is puzzled why it won't work. What do you think he needs to do? Select one. Write a DROP TABLE Limos statement to first delete the table Limos. O Use an ALTER TABLE Cars statement to delete the table Cars. Use an ALTER TABLE Limos statement to first delete the table Limos. Add an ON UPDATE CASCADE statement after FOREIGN KEY statement for Limos Hide Feedback The DROP TABLE Cars statement will not work unless there is also another DROP TABLE Limos statement instructing the database to first delete the table Limos. This is because the table Limos has a foreign key Driver that references the primary key CarModel in the table Cars. When a table with a foreign key constraint references a table's primary key, the table with primary key cannot be deleted with a DROP TABLE statement unless the table with the foreign key constraint is deleted first. Question 10 0/2 points The following ParticipantGrade table contains four columns named FirstName, LastName, StudentiD, and Grade. StudentID is the only auto-increment field in the table and Grade is a NOT NULL field that can only accept one letter value between A and F. Values for three records are provided below. FirstName LastName StudentID Grade Jean Altman 3018 Tyler Swift 3019 Dave Capell 3020 INSERT statements to add more students are given below. Which of these will result in errors? Select all that apply. INSERT INTO ParticipantGrade VALUES ('Nora', Jones 3021. A); INSERT INTO ParticipantGrade VALUES ('Jones' 'Nora."); INSERT INTO Participant VALUES (Jones', 'Nora..); INSERT INTO ParticipantGrade VALUES ('Norah Jones'.A'); Hide Feedback Inserting primary key values for auto-increment columns such as the StudentID will result an error; in one of the syntax options, new Studentin was entered as 3021 although it would have been auto-incremented. Another error that database users make is entering Null values for columns that are NOT NULL, such as the Grade column; in one of the syntax options, no value was provided for Grade, which is a NOT NULL column. A third type of error is omitting the column names but entering values in the Values clause in an order that doesn't match the order of the column names. This is seen in another syntax option that enters LastName before FirstNameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started