rbd Flashcards
The SELECT statement is used to
fetching records from the database
The INSERT statement is used to
inserting records into the database
The DELETE statement is used to
deleting records from the database
The UPDATE statement is used to
updating records in the database
INDEX in the database speeds up
searching for records in the database
The COMMIT statement is used to
approving changes to the database
The ROLLBACK instruction is used to
Rolling back changes to the database
The GRANT instruction is used to
granting permissions in the database
The REVOKE instruction is used to
revoking permissions in the database
The ALTER TABLE statement is used to
table schema changes
What is the value of the expression Null=Null
is undefined
What is the value of the expression True OR Null
True
What is the value of the expression False OR Null
Null
What is the value of the expression False AND Null
False
What is the value of the expression True AND Null
Null
What is the value of the NOT Null expression
True
What will be the result of executing the statement SELECT * FROM Employees WHERE EmployeeID=EmployeeID OR EmployeeID=NULL, Emp’s report
What will be the result of executing the statement SELECT * FROM Emp WHERE EmployeeID=EmployeeID AND NULL=EmployeeID, empty relation
Relation R has an attribute a. What number can be the result of executing the statement SELECT Count() FROM R WHERE a=a, always as many as the cardinality of the relation R
Relation R has an attribute a. What number can be the result of executing the statement SELECT Count() FROM R WHERE a<a, always 0
An entity corresponds to in a relational database
table
A unique relationship corresponds to the following in a relational database
foreign key
An ambiguous relationship corresponds to the following in a relational database
table
An attribute in a relational database corresponds to
column in table
A unique identifier corresponds to the following in a relational database
master key
Referential integrity concerns the fact that
the value of a foreign key can be null or the value of its corresponding primary key
Third normal form concerns the fact
values in a non-key column cannot depend on either part of the key or even transitively on the key
Which of the following statements are true in the relational modelx the poems are not repeated, the order of the columns is irrelevant, values in the column are not repeated
Which of the following statements are true in the relational model
a unique relationship is represented by a foreign key
Which of the following statements are true in the relational model
an index is automatically created for a unique key, a unique index is automatically created for the primary key
Which of the following statements are true in the relational model
primary key values cannot be repeated
Which of the following statements are true in the relational model
there can be multiple foreign keys, there can be multiple indexes
Boyce-Codd normal form refers to the fact
every nontrivial functional dependency is a dependency on a superkey
Which of the following statements are true
There should be no uncontrolled redundancies in the table
Which of the following statements are true
each fact stored in the database should be expressed in only one way
At what levels is a relational database designed
logical, physical
Who is the creator of the relational database model
Edgar Codd
Which company first implemented a relational database management system
IBM
When the table schema is not in third normal form we have
redundancy, anomalous insertion, anomalies in removal, anomalies in modification
Functional dependency concerns the relationship between
attributes
Elimination of partial and transitive dependencies leads to
III normal form
When moving to an object table, the table row
obtains object identity, may have related methods, becomes an object of a certain class
What type can an attribute value be in the object-relational model
list of values, reference to an object, a set of values, atomic value
A class diagram in ODL includes
attributes, compounds, methods
A class schema in ODL is defined using the keyword
interface, class
ODL language specifications include
inverse compounds, inheritance
Given the relational schema R={City, Street, Code}, F = {City,Street->Code
Code->City}. This schema
Given the relational schema R={City, Street, Postcode, Post}, F = {City, Street->Postcode
Postcode->City
Given the relational schema R={City, Street, Postcode, Post}, F = {City, Street->Postcode
Postcode->Post}. This schema
Given a relational schema R={City, Street, Code}, F = {City, Street->Code}. This schema
is in Boyce-Codd normal form, is in the third normal form
Given the relational schema R={Street, Code, Shop}, F = {Street->Code
Shop->Street}. This schema
Given the relational schema R={Street, Code, Shop, Number}, F = {Street->Code
Street, Number ->Shop}. This schema
Given the relational schema R={Student,Address,Dormitory}, F = {Student->Address
Dormitory->Address
Given the relational schema R={Student,University,Address,Club}, F = {Student->University
Club->Address}. This schema
Given the relational schema R={Student,University,Address,Club}, F = {Student->University
Club->Address
Given the relational schema R={Student,University,Address,Club}, F = {Student, University->Club
Club->Address}. This schema
Which of the following statements are true for a non-identifying relationship in Visio
the foreign key is not part of the primary key of the entity on the multiple side
Which statements are true for the identifying relationship in Visio
the foreign key is part of the primary key of the entity on the multiple side
Reference actions apply to Visio
performing INSERT, DELETE and UPDATE operations on related records
In Visio, the Cardinality property defines
how many instances of an entity on the one side can be associated with an instance of an entity on the many side
In Visio, the optionality property specifies
is the relationship optional
In Visio, the Relationship Type property specifies
is the relationship identifying
As a result of the transformation of a binary wildcard relationship, the number of entities created is
1
As a result of the transformation of a binary ambiguous relationship, the number of relationships created is
1
As a result of the transformation of a ternary ambiguous relationship, the number of entities created is
1
As a result of the transformation of a ternary ambiguous compound, the number of compounds created is
1
A cycle in an entity-relationship diagram means that
there may be a recursive relationship
An instance of a one-to-one relationship is always a function
“on”
In Chen modeling notation, the relationship is represented by
diamond
In Chen’s modeling notation, an entity is represented by
rectangle
In Chen’s modeling notation, an attribute is represented by
wheel
Students have ideas. Each idea is about something. Each idea comes to mind of exactly one student. The student can share the idea with fellow students. Which of the following schemes is most appropriate from the point of view of database design principles
Students(student_id, name, surname, address), Ideas(idea_id, thing, description, student_id), Colleagues(idea_id, colleague_id)
Students like each other, are indifferent to each other, or can’t stand each other (there is no other way). Which of the following schemes is most appropriate from the point of view of database design principles
Students(student_id, name, surname), Likes(student_id, colleague_id), Dislikes(student_id, colleague_id), Indifferent(student_id, colleague_id)
Domestic animals live in the houses. Some animals eat each other. The houses can be located next to each other. Which schema, according to the principles of database schema design, is most appropriate for an animal welfare organization
Homes(house_id, address), Animals(animal_id, type_id, house_id), Types(type_id, type), Next_to_each_other(house_id1, house_id2), Eats(type_id, type_id_eaten)
Movies are played by actors. Each movie has exactly one director and one or more screenwriters. Which of the following schemes is most appropriate from the point of view of database design principles
Movies(movie_id, title, director_id, director_salary), People(person_id, last_name), Actors(actor_id, movie_id, role, salary), Screenwriters(screenwriter_id, movie_id, salary)
Politicians belong to political parties (sometimes they change them, sometimes they split them). Political parties, before elections, form electoral coalitions. Which of the following schemes is most appropriate from the point of view of database design principles
Politicians(policy_id, name, surname), Parties(party_id, name, from, to), Coalitions(coalition_id, election_date), Members(party_id, person_id, from, to), In_coalition(party_id, coalition_id, from, to)
Students plan what they would like to do in their future careers and what positions they would like to hold. Which of the following schemes is most appropriate from the point of view of database design principles
Students(student_id, name, surname), Classes(class_id, name), Positions(position_id, name), Who_what(student_id, position_id, class_id)
A database is to be created at PJWSTK to collect information about skills useful in professional work, subjects that teach these skills, and books in which the skills are described. Which of the following schemes is most appropriate from the point of view of database design principles
Skills(skill_id, name, description), Where(skill_id, ISBN, from_page, to_page), On(skill_id, subject_id), Subjects(subject_id, name, semester), Book_copies(call number, title, authors, shelf_number)
At PJWSTK a database is being created with information on what software is installed in each room - with a view to conducting classes in the appropriate subjects in them. Which of the following schemes is the most appropriate from the point of view of database design principles
Programs(program_id, company, name, version), Items(item_id, name), Rooms_programs(room_no., program_id, number_of_installations), Items_programs(item_id, program_id), Rooms(room_id, number, how_many_computers)
Which of the following database schemas is most appropriate for a library from the point of view of database design principles? The database should store information about customers, books, and loans (capital letters indicate the primary key)
Customer(CUSTOMER_ID, name, surname, address), Book(BOOK_ID, title, author), Loan(CUSTOMER_ID, BOOK_ID, LOAN_DATE, RETURN_DATE)
A database is needed to record students and their grades. Which of the database schemas is most appropriate from the point of view of database design principles
Student(student_id, name, surname), Assessment(assessment_id, assessment, date_issued, subject_id, student_id), Subject(subject_id, name)
Which methods concern maintaining data consistency during concurrent access
pessimistic blocking, optimistic locking
Which methods concern data protection against unauthorized access
entering accounts and passwords, granting permissions to perform operations on objects
Data dictionary data (metadata) is stored in the database
in special tables in the same database
Client-server architecture means
division of tasks performed by the application into two aspects
Client-server architecture means
that one program provides services to a group of other programs
Which of the following statements are true
There can be many servers and many clients on one computer
Which of the following statements are true
a program acting as a server can become a client of another server, the user interface is part of the client program, the client and server can be on different computers
Which of the following statements are true
a program acting as a server can become a client of another server, the user interface can be generated by the client program, the user interface can be generated by a server program
Which of the following objects appear in the MS Access database window
modules, forms, macros, reports
Which of the following objects appear in the MS Access database window
modules
Which of the following objects appear in the MS Access database window
forms, reports
Which of the following objects appear in the MS Access database window
modules, tables
Which of the following objects appear in the MS Access database window
tables, forms, macros
Which SQL standard operators are not available in MS Access
INTERSECT, EXCEPT
Which SQL standard operators appear in MS Access
UNION, DISTINCT
Which SQL standard operators are not available in MS Access
INTERSECT, EXCEPT
Which Access operators are not included in the SQL standard
DISTINCTIVE
Can a SELECT statement appear
in the query grid in the Field row, in the query grid in the Criteria row, as a source of rows for the form, as a row source for a list box on a form
A pass-through query consists of
sending SQL statements to the database server via ODBC
A pass-through query can be used to
creating a table in the SQLServer database, creating a view in the SQLServer database
A pass-through query can be used to
creating a table in the Oracle database, creating a view in the Oracle database
A pass-through query can be used to
fetching data from a remote database, executing SQL statements in a remote database
A pass-through query can be used to
executing SQL statements in a remote database
A pass-through query can be used to
fetching data from a remote database
A pass-through query can be used to
deleting a table in a remote database
What role do tables play in MS Access
physical structure of data storage, logical structure of data storage, data sources for forms
What operations can be performed on an MS Access table in datasheet view
add a new row, add a new column, delete a row, remove column
What operations can be performed on an MS Access table in table design view
add a new column, remove column
What operations can be performed on an MS Access table in datasheet view
sort rows by values in one of the columns, put on a filter, apply filter
What operations can be performed on an MS Access table in table design view
add a new column, remove column
The reference is defined for
foreign key columns
“Cascading Delete Related Records” option
enables the preservation of referential integrity constraints, is set in the edit properties window of the relationship between two tables
Row join type
is set in the properties pane of the relationship between two tables, has three options
Perspective in MS Access is
select query
Which of the following are query type names
updating
What are the possible forms of the form (Default View) in the form view
single form, data sheet, continuous form
The displayed form content can be divided into
pages, bookmarks, windows
A form field can be
related, unrelated, calculated
What value can the expression If(IsNull([Earnings]),0,[Earnings]) have?, 0, equal to the value of the expression [Earnings]
The natural logical structure for dividing data in a report is
groups, pages, columns
Cross-tabulation of data uses
cross-tab queries
Data stored in an MS Access database can be accessed over the web for display in browsers using
data access pages, ODBC and web server
Which of the following objects can appear on a standard Access form as its dialog items (controls)
list
Which of the following objects can be included in a module in Access
function, variable
Which of the following objects can be stored in a table field in an Access database
Word document, value YES/NO
What objects in Access can event procedures be linked to
field in the table
Using ODBC technology you can in an MS Access database
save data to Oracle database, define a table linked to a table in the SQL Server database
The link is
a field on a form containing a reference to a record position in a table
What does the term “Filter by form” mean
searching for records according to the conditions entered into the form by the user
Which events can be programmed for the form
at closing, after update
In the WHERE condition: Institutions![Institution ID]=Forms![Persons]![Institution ID] the Institutions, Persons objects can be respectively
table and form
Where can you use the expression Sum([Cost])
in the form footer, in the form details section, in the “Field” row of the query grid
The ActiveX control is
a form dialog element supported by a registered Windows application
MS Access allows you to use remote ODBC databases in the following ways
by linked tables, by forwarding queries, using the Connection object and record sets
The DLookUp function allows you to
bringing values from another table to the form
The IIf function allows you to
interpreting Null as an empty string
Replacing a foreign key field in an MS Access table with a lookup (LookUp)
allows you to edit a table field by selecting a value from an installed control - a combo box, allows you to view values also from fields other than the key fields of the parent table
The “autonumber” value that can be selected in the “data type” field of the MS Access table design view specifies the values of this field as
is a mechanism for automatically entering consecutive natural numbers or random numbers different from each other in subsequent table records into a field for which this type of value is specified
If for MS Access tables that are related to each other, the primary key of the parent table is implemented by “autonumbering”, then the corresponding foreign key field of the child table should be declared as variable type
long integer
Deleting cascade-related records in an MS Access database can be accomplished by
selecting the “cascade delete related records” option when declaring integrity constraints for the relationship that connects these tables, then the database system will automatically delete the related records from the child table before deleting the record in the parent table
the data source for an Append query in MS Access can be
another table or query
After creating a new table in MS Access the database system
will suggest the user to define a primary key field and possibly select such a field and make it the primary key.
When creating a form with a subform to simultaneously view records from the parent table and their related records from the child table, the database application designer must ensure
the existence of fields in the record sources of both forms that will enable linking corresponding records.
The purpose of the TOR document is
a reference point for further design work, writing down the functions that the database application is to perform
Entity Relationship Diagram
is used by analysts, abstracts from the implementation details of the database, is used to determine user requirements
What processes are subjected to design objects stored in the CASE tool repository
transformation, versioning, generation (forward engineering), reverse engineering
What are the phases in the MSF risk model
analysis, planning, tracking, control
What elements is the MSF process model based on
checkpoints (milestones), managing the relationship between resources, schedule and features
Which phases are distinguished as basic in the MSF process model
Planning phase, Analysis phase, Design phase, Creation phase
Which roles are included in the MSF project team model
Project Manager, Product Manager, program manager
According to the MSF methodology, the following are responsible for delivering the product within the design constraints
Project Manager, program manager
According to the MSF methodology, the following persons are responsible for delivering a product that complies with the specification
Product Manager, tester
What are the fundamental aspects of the MSF enterprise architecture model
business, information, applications, technology
What design perspectives are highlighted in the MSF design process model
conceptual, logical, physical
What layers are distinguished in the MSF application model
presentation layer, business layer, data layer
Saving whether a select query returns an empty set in a Boolean variable can be done using
set of records
Synchronizing two unrelated lists on a form can be done using
DLookUp function, ApplyFilter method (of DoCmd object), OpenForm methods (of the DoCmd object)
Which of the constructs are used for validation and error handling in the application
action CancelEvent, “On Error” event procedure, On Error instruction, event procedure “When value is not in list”
For what objects can a record set be defined
form, report, table
Which of the following objects are part of the ADO hierarchy
record sets
Which of the following statements are used to synchronize values in two forms
DoCmd.ApplyFilter, DoCmd.Requery
Which of the following expressions are part of the SQL language
Select Distinct People.LastName From People, Update People Set Data = null
The collection is
an object representing a set of elements
A record set is
RecordSet type object
ADO is a library of objects and collections that allows access to
data
The root of the ADO hierarchy is the object
Connection
DoCmd is
an object whose methods are used to execute commands
Control is
an object belonging to the Controls collection
What does the Visual Basic runtime environment include
program analysis window, break points, class object navigator
Access administrative tools allow you to
database defragmentation, converting a database from an earlier version of Access, creating user accounts, data replication
Access administrative tools allow you to
database defragmentation, converting a database from an earlier version of Access, data replication
Access administrative tools allow you to
managing Access databases in a local network, converting a database from an earlier version of Access, repairing a corrupted database, data replication
Access administrative tools allow you to
database defragmentation, converting a database from an earlier version of Access, database encryption
Access administrative tools allow you to
separating data from the user interface, setting a password for the database, data replication
Which of the following actions can speed up the performance of a database application
using the Database Performance Analyzer, removing drawings from unbound frames, using the Database Table Analyzer
Which of the following actions can speed up the performance of a database application
using the Database Performance Analyzer, converting to .mde format, removing drawings from unbound frames, using the Database Table Analyzer
Which of the following actions can speed up the performance of a database application
using the Database Performance Analyzer, removing drawings from unbound frames, using the Database Table Analyzer
Which of the following actions can speed up the performance of a database application
using the Database Performance Analyzer, establishment of new indexes, removing some indexes, removing drawings from unbound frames
Which of the following actions can speed up the performance of a database application
using the Database Performance Analyzer, replacing queries as a row source for lists with SELECT statements
The java.sql package includes
interface responsible for establishing a connection to the database, a class that manages the list of available drivers, interface for managing the list of available drivers
The java.sql package includes
a class representing an SQL statement, a class representing a database connection, a class representing a set of query results
What are the methods of the Statement class
executeQuery, executeUpdate
What are the methods of the ResultSet class
next, getString
What are the methods of SQLException class
getSQLState
The commit method belongs to the class
Connection
To model an ambiguous relationship (many-to-many) in MS Visio you need to
Create an association entity and link it to the output entities with two one-to-many relationships, where the association entity will remain on the “one” side
The relationship STATE - RIVER (“flows through”) is a relationship?
many - many
How many tables should a simple normalized database containing information about floors, rooms and “one-to-many” relationships between them consist of?
2
The entities PRESIDENT and STATE (with the dependency “directs”) are connected by the relationship
one - many
Which SQL statements will list employees working in a department named “DALLAS” or “CHICAGO” earning more than $1,200,, SELECT NAME,DEPT,SAL FROM EMP WHERE (DEPT=’DALLAS’ OR DEPT=’CHICAGO’) AND SAL>1200
In MS Visio, the circle separating the relationship is placed on the relationship line
ambiguous
Given a relational schema: R = {Student, University, Address, Club}, F = {Student -> University
Club -> Address
What is the value of the logical expression TRUE AND (Null OR FALSE)
False
The entities COUNTRY and RIVER (with the relationship “the river flows through many countries”) are connected by a relationship, many - many
There are three tables Customers(Customer_ID, First_Name, Last_Name), Products(Product_ID, Name, Price) and Purchases(Customer_ID, Product_ID, Quantity). Indicate the correct SQL query that finds the names and surnames of customers who have purchased at least one product, SELECT DISTINCT FirstName, LastName FROM Customers LEFT OUTER JOIN Shopping ON Customers.Customer_Id = Shopping.Customer_Id
What will be the result of executing the following statement on a non-empty relation PERSON (PersonId, FirstName, LastName, AccountNo.): SELECT * FROM Person WHERE AccountNo. = AccountNo. OR AccountNo. = NULL?, relationship Person
There are domestic animals living in the houses. Some animals eat each other. The houses can be located next to each other. Indicate which of the following diagrams (primary key attributes are marked in capital letters) correctly (and without redundancy) model the problem, Homes(HOUSE_ID, address) Animals(ANIMAL_ID, type_id, house_id) Types(TYPE_ID, type) Next_to_each_other(HOUSE_ID1, HOUSE_ID2) Eats(TYPE_ID_EATS, TYPE_ID_EATEN)
If there is a GROUP BY clause in the query, then the SELECT can be followed by
column following GROUP BY
The CURRENCY entity and the COUNTRY entity (with the relationship “the country has one currency”) are connected by a relationship, one - many
There are three tables Customers (Customer_ID, First_Name, Last_Name), Products (Product_ID, Name, Price and Purchases (Customer_ID, Product_ID, Quantity). Indicate the correct SQL query that finds the first and last names of customers who purchased the product named Washing Machine., SELECT FirstName, LastName FROM Customers INNER JOIN Shopping ON Customers.Customer_Id = Shopping.Customer_Id INNER JOIN Products ON Products.Product_Id = Shopping.Product_Id WHERE Name = ‘Washing Machine’
Relation R has an attribute a. What number can be the result of executing the statement SELECT COUNT(*) FROM R WHERE a <> a
, always 0
What is the value of the logical expression TRUE OR Null OR FALSE
True
The concept of reference shares applies, Performing DELETE and UPDATE operations on related records, Possibilities of linking entities together with an unambiguous relationship
The tables STUDENT and SUBJECT (with the relationship “each student takes multiple subjects”) are connected by the relationship
Requiring an additional association table, many - many
Specify the correct SQL query (ORACLE dialect) that finds the average earnings of only those departments that employ more than three employees
SELECT deptno, AVG(sal) FROM emp HAVING COUNT(*) > 3 GROUP BY deptno
Given two tables Osoby(Imię, Nazwisko, Zarobki, Id_działu)and Działy(Id_działu, Nazwa). Which of the following statements are valid SQL statements in the ORACLE dialect?, INSERT INTO Osoby (Imię, Nazwisko, Zarobki) VALUES (‘Jan’, ‘Kowalski’, 2000), DELETE FROM Osoby WHERE Id_działu = 10
A unique relationship is implemented in a relational database by
foreign key
If there is a GROUP BY clause in the query, then HAVING can be followed by
summary function
The requirements specification states: An album consists of a number of songs
a song is in one album. In which drawings is this requirement modeled correctly. (The arrow indicates the “one” side of the relationship)?, (The first image)
The logical value of the expression FALSE OR Null AND TRUE is
FALSE
Given the relational schema R={City, Street, Postcode, Post}, F = {City, Street->Postcode
Postcode->City
Given the relational schema R={Street, Code, Shop}, F = {Street->Code
Shop->Street}. This schema
What is the value of the logical expression TRUE OR Null OR FALSE
True
The IIf function allows you to
interpreting Null as an empty string