Database Design and Data Structures Quiz
18 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is a composite key in a database?

  • A key that allows non-unique entries in a column.
  • A key that is used only in relational databases.
  • A key that includes one or more columns that uniquely identifies a record. (correct)
  • A key containing unique information across all columns.

Which of the following is not a step in the database design process?

  • Delete obsolete records (correct)
  • Add the data
  • Create the tables
  • Investigate

When creating a table in SQL, what must you specify for each column?

  • The default value
  • The data type and whether it is NULL or NOT NULL (correct)
  • The length of the table
  • The indexing method

Which SQL SELECT option is used to organize the returned data?

<p>ORDER BY (A)</p> Signup and view all the answers

What does LIFO stand for in data structures?

<p>Last in, first out (D)</p> Signup and view all the answers

Which FAT format allows for the largest possible volume size?

<p>FAT32 (C)</p> Signup and view all the answers

Which statement accurately describes sectors in relation to clusters?

<p>Clusters are made up of sectors (B)</p> Signup and view all the answers

What is a notable feature of NTFS compared to other file systems?

<p>It includes journaling features. (B)</p> Signup and view all the answers

Which is not a file system used in Linux?

<p>HFS+ (B)</p> Signup and view all the answers

What is the hashing algorithm key in the given context?

<p>20 (B)</p> Signup and view all the answers

If a rocket launch number is 80000, what is the relative record?

<p>400 (A)</p> Signup and view all the answers

Which of the following is not an example of a high-level programming language?

<p>Boolean (B)</p> Signup and view all the answers

Which converts source code into an executable file?

<p>Compiler (D)</p> Signup and view all the answers

Which translates program statements one by one into a language the computer can understand?

<p>Interpreter (B)</p> Signup and view all the answers

What is the final result of the expression $5 + 2 * 4 - 2$?

<p>11 (A)</p> Signup and view all the answers

Which is not a type of control structure?

<p>Algorithm (A)</p> Signup and view all the answers

What is the document responsible for describing data stored in a database?

<p>Data dictionary (B)</p> Signup and view all the answers

Scope creep is considered beneficial for a project because it enhances the functionality.

<p>False (B)</p> Signup and view all the answers

Flashcards

C++

A high-level programming language that allows for fast and efficient execution of code.

Compilation

A process of converting human-readable source code into machine-executable code.

Waterfall Model

A software development model that uses a linear, sequential approach, where each phase is completed before moving to the next.

Flowchart

A visual model used to describe a program's logical steps, often represented with symbols and arrows.

Signup and view all the flashcards

Data Dictionary

A document that describes the data stored in a database, including its structure, types, and relationships.

Signup and view all the flashcards

Spiral Model

A software development life cycle (SDLC) model that emphasizes iterative development and feedback loops.

Signup and view all the flashcards

UML (Unified Modeling Language)

A visual modeling language used to create diagrams for software systems, focusing on object-oriented design.

Signup and view all the flashcards

SDLC (Software Development Life Cycle)

A structured approach to software development with clear phases, including requirements gathering, design, implementation, testing, and deployment.

Signup and view all the flashcards

Software Testing

The process of finding and fixing errors in a software application.

Signup and view all the flashcards

Prototype

A pre-production version of a software application that serves as a working model for testing and feedback.

Signup and view all the flashcards

What is a composite key?

A composite key is a combination of two or more columns used to uniquely identify a row in a table.

Signup and view all the flashcards

What are the steps in the database design process?

The database design process involves several steps, including investigating data requirements, creating tables, establishing relationships between tables, and adding data.

Signup and view all the flashcards

Do you have to specify NULL or NOT NULL when creating a SQL table column?

In SQL, the NOT NULL constraint ensures that a column cannot have a null value. So, it's not mandatory to explicitly declare a column as NULL or NOT NULL. Databases by default assume a column can have null values.

Signup and view all the flashcards

Can you add multiple records in one INSERT INTO statement?

The SQL INSERT INTO statement allows adding multiple rows of data simultaneously to a table.

Signup and view all the flashcards

Is data returned by SQL SELECT always in descending order?

The SQL SELECT statement, by default, returns data in the order it is stored in the database. To arrange data in a specific order, you need to use the ORDER BY clause.

Signup and view all the flashcards

How do you sort data returned by SQL SELECT?

The SQL ORDER BY clause sorts the result set based on the specified columns.

Signup and view all the flashcards

What is an array?

An array is a data structure that stores a fixed-size, sequential collection of elements of the same data type. Each element is accessed through its unique index, starting from 0.

Signup and view all the flashcards

What is a stack?

A stack is a data structure that follows the LIFO (Last-In, First-Out) principle. Imagine a stack of plates: you remove the top plate (the last one added) first.

Signup and view all the flashcards

Study Notes

Database Design

  • Composite keys do not contain unique information. A composite key is a column composed of unique pieces of information. (b is correct)
  • Database design steps include investigating, creating tables, and creating relationships. Adding data comes later. (c is incorrect)
  • When creating a table in SQL you must specify whether a column can accept a NULL value or not. (a is correct)
  • SQL INSERT INTO can add multiple records in one statement. (a is correct)
  • SQL SELECT statements return data by default in an undefined order, nor in descending or ascending order. (b is correct)
  • SQL ORDER BY is used to sort data. (a is correct)

Data Structures (Arrays)

  • An array is a collection of contiguous memory locations. (a is correct)
  • Array elements are accessed using an index or subscript. (c is correct)
  • A single array can hold different data types. (b is correct)
  • char[] aAnswers = new char declares an array; it does not specify memory locations 1 through 5. (b is correct)
  • An offset specifies the distance between adjacent memory locations in an array. (a is correct)
  • Arrays are suitable for static data, not dynamic data. (b is correct)

Data Structures (Stacks and Queues)

  • A stack follows a LIFO (Last-In, First-Out) structure. (a is correct)
  • A queue follows a FIFO (First-In, First-Out) structure. (a is correct)
  • LIFO stands for Last-In, First-Out. (b is correct)
  • FIFO stands for First-In, First-Out. (a is correct)

File Systems

  • File system responsibilities include creating, manipulating, renaming, and copying files. (e is incorrect)
  • Sectors are not made up of clusters. (b is correct)
  • FAT files use non-contiguous memory storage. (a is correct)
  • FAT32 allows the largest volume size among the FAT formats. (c is correct)
  • Disk Defragmenter reorganizes clusters to minimize drive head movement. (a is correct)
  • NTFS supports file access rights and journaling and file encryption. (b is correct)
  • An advantage of NTFS is efficient disk usage, not small volumes. (c is incorrect)
  • Linux file systems include XFS, JFS, and ext3, but not HFS+. (a is incorrect)

Hashing

  • The hashing key is determined by dividing the greatest possible launch number by the number of expected launches( not 5000000). (b is correct)
  • if the launch is 80,000, the relative record is determined by dividing 80000 by 20. (b is correct)

Programming Languages

  • Languages like Ada, C++, and Java are high-level programming languages. (b and c are incorrect)
  • A compiler converts source code into a computer executable file. (a is correct)
  • An interpreter translates source code statement by statement. (b is correct)
  • Pseudocode is written before source code to guide program development and to illustrate logic. (b is correct)
  • Programming languages include low-level, assembly, high-level and machine. (e is incorrect)
  • Computers only understand binary code (1s and 0s). (a is correct)
  • Not all languages have an IDE included (integrated development environment). (b is incorrect)

Programming Fundamentals

  • Variable names identify specific memory locations and values. (a is correct)
  • 5 + 2 * 4 - 2 = 11 (b is correct)
  • 5 % 4 + 3 - 2= 2. (a is correct)
  • Post-increment operator first processes the statement and then increments. (b is incorrect)
  • Pre-increment operator first increments and then processes the statement. (a is correct)
  • Control structures include invocation, top-down, and selection, but algorithms are not a control structure. (c is incorrect)
  • End users need/require to be involved throughout the design process for program development.. (a is correct)
  • Software engineering tasks include communicating with clients, designing screens, writing the application, and creating design documents. (e is incorrect)
  • Design documents are blueprints for application functionality. (b is correct)
  • The SDLC (Software Development Life Cycle) involves feasibility studies, software design, and other steps (listed in the question). (d is incorrect)
  • Waterfall, evolution, spiral, and incremental are valid software development models. Degradation is not. (b is incorrect).
  • UML assists in creating visual models of application functionality. (a is incorrect)

Software Development Practices

  • A good program requires user involvement, initial requirements capture, iterative development and testing, not just writing and delivering. (a is incorrect)
  • A data dictionary documents data types. (b is correct)
  • Active user participation in design, including screen and report design, is highly recommended. (a is correct)
  • A flowchart is a visual model of a program's logic. (a is correct)
  • A prototype is a simplified version of a program. (b is correct)
  • A design document should include project objectives, requirements, and feasibility but not cost analysis for general use. (b and c are incorrect)
  • Scope creep is undesirable in project development, not necessary. (b is incorrect)
  • End users who report bugs should be helped to understand why, not given training intended to stop the user from reporting issues. (a is incorrect)
  • Testers are crucial. Project delays should not result in their elimination (in the priority ordering). (a is incorrect)

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Description

Test your knowledge on database design principles and data structures like arrays. This quiz covers essential concepts such as composite keys, SQL commands, and array characteristics. Perfect for students studying computer science or related fields.

More Like This

Use Quizgecko on...
Browser
Browser