Join 75,000+ students acing their exams with Studygenie
Unlimited practice
Flashcards, multiple choice and written questions, as many as you want.
Study sets in seconds
Turn your notes and files into a set with AI.
See your progress
Always know what you've learned and what's left.
Questions in this set (20)
What is the significance of a weak entity in the Chen model Entity Relationship diagram?
It cannot be uniquely identified by its own attributes and depends on a strong entity
How does logical data independence differ from physical data independence?
Logical independence allows changes to the conceptual schema without affecting external schemas, while physical independence allows changes to the internal schema without affecting the conceptual schema
How does the Atomicity property of ACID transactions ensure data consistency?
It guarantees that all operations in a transaction are completed successfully or none are applied
What are the two types of participation constraints in an Entity Relationship diagram?
Total participation and partial participation
How is a relation determined to be in Boyce-Codd Normal Form (BCNF)?
Every determinant is a candidate key
What does the 'I' in ACID properties of transactions stand for?
Isolation
What is the purpose of the ANSI-SPARC database architecture?
To separate the physical, conceptual, and external levels of a database system
Why is the 'type' attribute included in the Animals relation of the KW Humane Society database?
To categorize different species or breeds of animals in the shelter
How should a foreign key constraint be indicated when creating a table using SQL?
By using the FOREIGN KEY keyword and specifying the referenced table and column
How does the database design for KW Humane Society handle the relationship between animals and adopters?
Through an Adoption relation that links AnimalID and SIN (adopter's ID)
What is the primary key of the Animals relation?
ID (integer)
How would you write an SQL query to count the total number of animals for each type?
SELECT type, COUNT(*) FROM Animals GROUP BY type
What SQL query would list the name of adopters who adopted a cat on March 28, 2019?
SELECT Adopter.Name FROM Adopter JOIN Adoption ON Adopter.SIN = Adoption.SIN JOIN Animals ON Adoption.AnimalID = Animals.ID WHERE Animals.type = 'cat' AND Adoption.AdoptDate = '2019-03-28'
How would you write an SQL query to list the name and address of adopters who have made at least two adoptions?
SELECT Name, Address FROM Adopter WHERE SIN IN (SELECT SIN FROM Adoption GROUP BY SIN HAVING COUNT(*) >= 2)
What type of functional dependency is FD1: PatientNum → FullName, BedNum, WardNum, WardName?
Full functional dependency
How many attributes are in the PatientRec relation in 1NF?
13 attributes
What SQL query would list the animal type and total number of adoptions on June 14, 2018?
SELECT Animals.type, COUNT(*) FROM Animals JOIN Adoption ON Animals.ID = Adoption.AnimalID WHERE Adoption.AdoptDate = '2018-06-14' GROUP BY Animals.type
How would you write an SQL query to count the total number of dogs brought to the Humane Society on April 18, 2019?
SELECT COUNT(*) FROM Animals WHERE type = 'dog' AND DateAdmitted = '2019-04-18'
How many relations are described in the KW Humane Society database design?
Three relations: Animals, Adopter, and Adoption
Why is the given PatientRec relation considered to be in First Normal Form (1NF)?
All attributes contain atomic (indivisible) values