Flashcards in Compare and Contrast Various database structures Deck (13)
Which of the following statements is true about a column in a table of a relational database?
A column with naturally occurring unique values is a good choice to be the primary key.
Structured databases work well, but why is it sometimes a better choice to store data in unstructured and semi-structured databases?
There are certain types of data (PowerPoint presentations, text files, Word documents, etc.) that are more easily stored without the rigid formatting a structured database requires.
What is the purpose of a schema?
It describes the structure of a database.
A schema contains the names of all of the tables. It shows all of the columns along with their data types and lengths. It shows primary and foreign keys to demonstrate that the tables are related via common columns
How is a key/value pair database different from a relational database?
In a relational database, all attributes of a record are defined up front, and each record has all of the same attributes as the other records. In a key/value pair database, objects and their properties are stored, but each object doesn’t have to have all of the properties.
Why might a language like Extensible Markup Language (XML) be commonly used in a document database?
XML makes it easier to parse and sort through the data in a variety of types of documents.
A database administrator is considering adding a primary key to enforce unique rows, defining a format for a phone number, and adding a rule so that a user must enter a date prior to today. What is the administrator adding to the database?
Your manager has asked you to display the customer database schema. What useful information will your schema provide?
The structure of the database
In a relational database table, what is the significance of creating a field with a varchar data type?
It allows a variable number of characters to be stored for a particular column in each row.
The varchar data type provides for a variable-sized field type. If a book title is twenty-seven characters long, twenty-seven bytes are stored. If a title is only three characters long, only three bytes are stored, resulting in a significant savings in storage space.
What type of flat file contains plain text with delimiters to set apart the columns?
Comma Separated Values files are commonly used flat files, identifiable by the file extension .csv. They can easily be used to load database tables when they are designed so that the columns in the file match up with those in a database table.
Why is it important to consider the number and size of columns included in a table schema?
The size of each row affects the amount of storage used, and how quickly it can be processed.
In a relational database, what is the relationship between a primary key and a foreign key?
The primary key is in one table and it is matched to the foreign key in a secondary table.
An attorney uses a standard form to capture information about new clients. Which type of database would best suit those needs?
A relational database