0% found this document useful (0 votes)
20 views20 pages

Database Chapter 8 Complex Data Answers

b

Uploaded by

aigenerat42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views20 pages

Database Chapter 8 Complex Data Answers

b

Uploaded by

aigenerat42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Database Chapter 8: Complex Data

Answers

1. Which type of data model is frequently used today for the flexible
exchange of data, often between the back-end and front-end of an
application?

A. Network Data Model

B. Semi-Structured Data Model

C. Relational Data Model

D. Hierarchical Data Model

Answer: Semi-Structured Data Model (B)


Semi-structured data models like JSON and XML are widely used for data
exchange, especially in web services and mobile applications, due to their
flexibility.

2. Which characteristic allows each tuple in a semi-structured data


model to have a different set of attributes, with the ability to add
new attributes at any time?

A. Key-value mapping

B. Multivalued attribute types

C. Sparse column representation

D. Wide column representation

Answer: Wide column representation (D)


Wide column representation in semi-structured data models provides the
flexibility to accommodate varying sets of attributes per tuple and allows for
dynamic addition of new attributes.
3. What is the primary benefit of using a set-valued attribute for
storing a user's interests in a user profile, rather than normalizing it
in a relational model?

A. It reduces data redundancy.

B. It simplifies data querying.

C. It simplifies the data representation.

D. It ensures atomicity of data.

Answer: It simplifies the data representation. (C)


Storing a set of interests as a set-valued attribute can be simpler than
normalizing it into a separate table with a foreign key in a relational model,
especially for complex or frequently changing schemas.

4. Which of the following operations is explicitly mentioned for


managing data in a key-value map within semi-structured data
models?

A. update(key, new_value)

B. add(key, value)

C. put(key, value)

D. find(key)

Answer: put(key, value) (C)

The operations `put(key, value)`, `get(key)`, and `delete(key)` are common for
managing data in key-value maps. 'put' is used to add or update a key-value
pair.
5. How are readings taken at regular intervals, such as sensor data,
efficiently represented in semi-structured data models to avoid
(time, value) pairs?

A. As hierarchical objects

B. As key-value maps

C. As sets of integers

D. As arrays of values

Answer: As arrays of values (D)


Arrays are widely used for scientific and monitoring applications, allowing
readings taken at regular intervals to be represented as an array of values,
providing a more compact representation than (time, value) pairs.

6. Which type of database provides specialized support for array


data, including capabilities like compressed storage and query
language extensions?

A. Object-oriented database

B. Graph database

C. Relational database

D. Array database

Answer: Array database (D)

An array database is specifically designed to support arrays, offering features


such as compressed storage and extensions to query languages for efficient
handling of array data.
7. What kind of data structure is typically represented by JSON
objects?

A. Binary trees for efficient searching

B. Sets of (attribute name, value) pairs

C. Indexed lists with sequential access

D. Ordered collections of elements

Answer: Sets of (attribute name, value) pairs (B)


JSON objects are fundamentally key-value maps, which means they are sets of
attribute name and value pairs.

8. What is the primary reason why BSON (Binary JSON) is used


instead of standard JSON in some applications?

A. To improve readability for developers

B. To enable stricter schema validation

C. To support more complex nested structures

D. To provide more efficient data storage

Answer: To provide more efficient data storage (D)

BSON, or Binary JSON, is a compressed representation of JSON, primarily used


for more efficient data storage.

9. Which of the following accurately describes the structure of an


`itemlist` in the provided XML example?

A. It stores attributes of a `supplier`.

B. It is a sequence of `item` elements.

C. It represents the total cost of purchase.

D. It can contain only one `item` element.

Answer: It is a sequence of `item` elements. (B)

In the XML example, `itemlist` contains multiple `item` elements, indicating it is


a sequence of items.
10. What is the purpose of tags in XML data?

A. To compress the data size.

B. To perform mathematical computations within the data.

C. To mark up text and make data self-documenting.

D. To ensure data atomicity.

Answer: To mark up text and make data self-documenting. (C)

XML uses tags to mark up text, which inherently makes the data self-
documenting by providing context and structure to the information.

11. In the context of the RDF Resource Description Format, how are
facts primarily represented?

A. As binary files for compression

B. As a single, unified database table

C. As key-value pairs in a map

D. As triples (subject, predicate, object)

Answer: As triples (subject, predicate, object) (D)

RDF (Resource Description Format) simplifies the representation of facts by


using triples, each consisting of a subject, a predicate, and an object.
12. What is the primary advantage of RDF having a natural graph
representation?

A. It allows for easier conversion to relational tables.

B. It reduces the storage requirements of the data.

C. It simplifies the process of data normalization.

D. It facilitates the modeling of complex relationships and attributes.

Answer: It facilitates the modeling of complex relationships and attributes.


(D)
The natural graph representation of RDF data allows for intuitive modeling of
objects, their attributes, and complex relationships between them, similar to an
Entity-Relationship (ER) model but with flexible schema.

13. How does the first approach represent N-ary relationships in


RDF?

A. By converting them into a single, complex triple directly.

B. By using a quad structure (subject, predicate, object, context).

C. By creating an artificial entity and linking it to each N entity through


multiple triples.
D. By ignoring N-ary relationships and focusing only on binary ones.

Answer: By creating an artificial entity and linking it to each N entity


through multiple triples. (C)
The first approach for representing N-ary relationships in RDF involves creating
an artificial entity that acts as a central point, linking to each of the N entities
through separate binary triples.
14. What is the main goal of the Linked Open Data project?

A. To replace traditional relational databases with RDF.

B. To create a single, centralized database for all information.

C. To connect different knowledge graphs to enable queries across


databases.

D. To develop new database management systems.

Answer: To connect different knowledge graphs to enable queries across


databases. (C)
The Linked Open Data project aims to create a vast, interconnected network of
public knowledge graphs, enabling users to query and integrate data from
various distributed sources.

15. Which type system is introduced by the object-relational data


model that goes beyond atomic data types?

A. Flat file types

B. Strictly normalized types

C. Procedural language specific types

D. Richer type system with complex data types

Answer: Richer type system with complex data types (D)


The object-relational data model extends the traditional relational model by
introducing a richer type system that supports complex data types and object-
orientation, allowing for more structured and hierarchical data representation.
16. What is considered troublesome when applications are written
in object-oriented programming languages and interact with
relational type systems?

A. The mismatch between the type systems.

B. The requirement for extensive data normalization.

C. The lack of support for SQL extensions.

D. The inability to store atomic data types.

Answer: The mismatch between the type systems. (A)

A significant challenge arises from the mismatch between the type systems of
object-oriented programming languages and relational databases, often
requiring complex mapping efforts.

17. What is the primary function of an object-relational mapping


(ORM) system?

A. To convert SQL queries into object-oriented code.

B. To specify mapping between programming language objects and


database tuples.

C. To manage physical storage of database files.

D. To enforce ACID properties in distributed transactions.

Answer: To specify mapping between programming language objects and


database tuples. (B)
Object-relational mapping (ORM) systems bridge the gap between object-
oriented programming languages and relational databases by defining how
programming language objects relate to database tuples.
18. When defining a user-defined type like 'Person' with a primary
key and address, what does 'ref from(ID)' signify?

A. It creates a foreign key relationship to an 'ID' table.

B. It specifies that 'ID' is a reference type.

C. It indicates that 'ID' is a system-generated reference.

D. It declares 'ID' as a unique identifier for the type.

Answer: It indicates that 'ID' is a system-generated reference. (C)


The 'ref from(ID)' clause indicates that 'ID' is a system-generated reference,
which allows for referencing instances of this type in other tables.

19. Which of the following accurately describes table inheritance in


PostgreSQL and Oracle?

A. It creates a replicated copy of the parent table.

B. Subtables automatically inherit all data from supetables.

C. It allows a table to inherit the structure of another table.

D. It enables direct querying of multiple tables as if they were one.

Answer: It allows a table to inherit the structure of another table. (C)


Table inheritance, as supported by PostgreSQL and Oracle, allows a new table to
inherit the columns and sometimes constraints of an existing table, facilitating
a more object-oriented approach to database design.
20. How are relationships typically created between tables using
Reference Types?

A. By storing duplicated data across multiple tables.

B. By using a column in one table to contain references (pointers) to objects


in another table.
C. By joining tables based on common non-key attributes.

D. By establishing foreign key constraints between two tables.

Answer: By using a column in one table to contain references (pointers) to


objects in another table. (B)

Reference Types enable the creation of relationships by allowing a column in


one table to store references (pointers) to objects residing in another table,
effectively linking them.

21. What is the purpose of path expressions when using Reference


Types in queries?

A. To navigate and retrieve attributes from referenced objects directly.

B. To create new reference types dynamically.

C. To establish new relationships between tables.

D. To define the physical storage location of referenced objects.

Answer: To navigate and retrieve attributes from referenced objects


directly. (A)

Path expressions, in conjunction with Reference Types, allow users to navigate


through referenced objects and directly retrieve their attributes, simplifying
data access across linked tables.
22. What is the main challenge that information retrieval systems
aim to address when querying unstructured data?

A. Converting unstructured data into semi-structured data.

B. Normalizing the data into a relational format.

C. Retrieving relevant documents based on keywords and ranking them.

D. Ensuring the atomicity of data types.

Answer: Retrieving relevant documents based on keywords and ranking


them. (C)

Information retrieval focuses on efficiently finding and presenting relevant


documents from unstructured data based on user queries, often involving
sophisticated ranking models.

23. In the TF-IDF ranking method, what does 'n(d,t)' represent?

A. The number of documents containing term 't'.

B. The relevance of document 'd' to query 'Q'.

C. The total number of terms in a document 'd'.

D. The number of occurrences of term 't' in document 'd'.

Answer: The number of occurrences of term 't' in document 'd'. (D)


In the context of Term Frequency (TF), 'n(d,t)' represents the specific count of a
term 't' within a document 'd'.
24. When ranking documents using TF-IDF, what happens to 'stop
words'?

A. They increase the document's relevance.

B. They are used to determine proximity.

C. They are given higher weight.

D. They are typically ignored.

Answer: They are typically ignored. (D)

Stop words, common words like 'the', 'is', 'and', are generally ignored in TF-IDF
calculations because they carry little semantic weight and often clutter
relevance scores.

25. What is the primary purpose of Google's PageRank algorithm?

A. To measure the popularity/importance of web pages based on hyperlinks.

B. To identify broken hyperlinks on websites.

C. To measure the lexical similarity between web pages.

D. To categorize web pages by content.

Answer: To measure the popularity/importance of web pages based on


hyperlinks. (A)
PageRank is a key algorithm that evaluates the importance of web pages by
analyzing the quantity and quality of links pointing to them.

26. Which factor contributes to a page having a higher PageRank?

A. The page has fewer outgoing links.

B. The page contains more images.

C. The page is hyperlinked from many pages.

D. The page has a short URL.

Answer: The page is hyperlinked from many pages. (C)


Pages that are hyperlinked from many other pages, especially those with high
importance themselves, tend to have a higher PageRank.
27. What does Precision measure in the context of retrieval
effectiveness?

A. The percentage of returned results that are actually relevant.

B. The total number of documents in the dataset.

C. The percentage of all relevant results that were returned.

D. The time it takes to retrieve the results.

Answer: The percentage of returned results that are actually relevant. (A)
Precision directly indicates the accuracy of a retrieval system by measuring the
proportion of returned documents that are truly relevant to the query.

28. What does Recall measure in the context of retrieval


effectiveness?

A. The rate at which new documents are added to the system.

B. The percentage of returned results that are actually relevant.

C. The total number of results returned by the system.

D. The percentage of all relevant results that were returned.

Answer: The percentage of all relevant results that were returned. (D)
Recall measures the completeness of the retrieved set, showing what proportion
of all available relevant documents were successfully identified and returned.
29. When is keyword querying on structured data and knowledge
bases particularly useful?

A. When data needs to be retrieved quickly irrelevant of relevance.

B. When the database system only supports SQL queries.

C. When users do not know the schema or there is no predefined schema.

D. When the user knows the exact schema of the database.

Answer: When users do not know the schema or there is no predefined


schema. (C)
Keyword querying is especially beneficial for structured data and knowledge
bases when users are unfamiliar with the precise schema or when the data itself
lacks a strict, predefined structure, allowing for more intuitive searches.

30. Which type of data is associated with road maps, land-usage


maps, and topographic elevation maps?

A. Semi-structured data

B. Geographic data

C. Geometric data

D. Textual data

Answer: Geographic data (B)

These examples are all types of geographic data, which covers information
related to spatial locations and the Earth's surface.
31. How are two or three-dimensional Euclidean coordinates
commonly used in spatial data?

A. To specify the design information of objects like buildings and aircraft.

B. To define the attributes of semi-structured data.

C. To represent text documents in a spatial context.

D. To store information about temporal changes in data.

Answer: To specify the design information of objects like buildings and


aircraft. (A)

Two or three-dimensional Euclidean coordinates are used in geometric data to


represent the design and construction information of objects, such as buildings
and integrated circuits.

32. What specifically does a 'polyline' or 'linestring' represent in


geometric information?

A. A closed polygonal region.

B. A set of disconnected points.

C. A single point in space.

D. A connected sequence of line segments.

Answer: A connected sequence of line segments. (D)


A polyline or linestring represents a connected series of line segments, often
used to model features like roads.
33. What is one way a 'polygon' is represented in geometric
information?

A. As a list of vertices in order.

B. As a curved line with no endpoints.

C. As an approximate segmentation of a larger object.

D. As a single coordinate pair.

Answer: As a list of vertices in order. (A)


A polygon is represented by an ordered list of vertices that define its boundary,
and it can also be represented as a set of triangles (triangulation).

34. How are arbitrary polyhedra represented in some geometric


information systems?

A. By approximating them with a single sphere.

B. By listing their faces, each of which is a polygon.

C. By specifying only the central coordinate and radius.

D. By converting them into a 2D projection.

Answer: By listing their faces, each of which is a polygon. (B)


Arbitrary polyhedra can be represented by detailing their faces, where each face
is described as a polygon, along with an indication of which side is inside the
polyhedron.
35. Which SQL extensions are commonly used to support geometry
and geography data types in databases?

A. PostgreSQL and SQLite

B. SQL Server and PostGIS

C. Oracle and MongoDB

D. SQL Server and MySQL

Answer: SQL Server and PostGIS (A)


SQL Server and PostGIS are two prominent examples of database systems that
provide extensive support for geometry and geography data types, including
various spatial functions.

36. What is the primary function of a 'Region query' in spatial


databases?

A. To compute the shortest path between two points.

B. To find objects that are closest to a specified point.

C. To join two spatial relations based on a non-spatial attribute.

D. To identify objects that lie partially or fully inside a specified spatial


region.

Answer: To identify objects that lie partially or fully inside a specified spatial
region. (D)

Region queries are designed to retrieve spatial objects that fall within or
partially within a defined geographic area, such as using functions like
`ST_Contains()` or `ST_Overlaps()`.
37. Which type of spatial query would be used to find the shortest
path between two points in a road network?

A. Region query

B. Nearest neighbor query

C. Spatial graph query

D. Spatial join

Answer: Spatial graph query (C)

Spatial graph queries leverage the network structure of spatial data, like road
networks, to answer questions such as finding the shortest path between two
points.

38. What is 'Raster data' primarily composed of?

A. Bit maps or pixel maps in two or more dimensions.

B. Geometric shapes like points and lines.

C. Object-oriented programming language structures.

D. Structured textual information.

Answer: Bit maps or pixel maps in two or more dimensions. (A)


Raster data is defined as bit maps or pixel maps, often used for representing
continuous spatial phenomena like satellite images of cloud cover.
39. What is the primary difference between Geographic Information
Systems (GIS) and standard databases when storing geographic
data?

A. GIS are tailored for storing geographic data, incorporating specialized


functionalities.
B. Standard databases support real-time data, whereas GIS do not.

C. GIS cannot handle textual data, unlike standard databases.

D. GIS are general-purpose databases, while standard databases are


specialized.

Answer: GIS are tailored for storing geographic data, incorporating


specialized functionalities. (A)
Geographic Information Systems (GIS) are specialized databases built
specifically for the storage, management, and analysis of geographic data,
offering unique capabilities that standard databases may lack.

40. Why are spatial integrity constraints important in design


databases?

A. To maintain relationships between geometric objects, such as preventing


pipes from intersecting.
B. To optimize the storage of non-spatial object attributes.

C. To ensure that all objects have unique identifiers.

D. To allow for dynamic modification of object schemas.

Answer: To maintain relationships between geometric objects, such as


preventing pipes from intersecting. (A)
Spatial integrity constraints are crucial for ensuring that the geometric
relationships between objects in a design are valid and consistent, such as
preventing physical overlaps or maintaining specified distances.
41. What type of objects are typically represented in 'Design
Databases'?

A. Only textual documents with geographic coordinates.

B. Historical archives of scientific research findings.

C. Geometric objects and their connections representing a design's


structure.
D. Financial transactions and customer records.

Answer: Geometric objects and their connections representing a design's


structure. (C)
Design databases handle components as geometric objects, with connections
between them illustrating the overall structure of a design, whether two-
dimensional or three-dimensional.

You might also like