Computer Knowledge

Database Management Systems

5,543 Questions

Database Management Systems (DBMS) form the core framework for data storage, retrieval, and security in modern software applications. Concepts such as the E-R model, backup planning, SQL integration, and big data architecture are essential for computer knowledge sections. This hub offers a comprehensive set of practice questions to master DBMS fundamentals and advanced database operations.

E-R Model ConceptsBackup and RecoverySQL Server UpgradesJDBC and ODBCBig Data CharacteristicsData VirtualizationOracle Database

Database Management Systems Questions

Multiple choice php
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

In PHP 5, MySQL support was NOT enabled by default. It had to be explicitly enabled in php.ini by uncommenting or adding extension=php_mysql.so (Unix) or extension=php_mysql.dll (Windows). This was a common source of confusion for beginners.

Multiple choice project-management
  1. Project archives

  2. Database

  3. Storage room

  4. Project report

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Project archives are the designated repository for all project records, documentation, and historical information upon completion. Archives ensure records are preserved, organized, and retrievable for future reference. A database or storage room might be used physically, but 'project archives' is the formal PMBOK term.

Multiple choice sql
  1. sysobjects

  2. syscolumns

  3. syscomments

  4. sysviews

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In SQL Server, the syscomments system table stores the actual text of views, stored procedures, triggers, and rules. The sysobjects table contains the names and types of objects, but not their underlying source code.

Multiple choice sql
  1. The public role captures all default permissions for users in a database.

  2. The public role cannot be dropped.

  3. The public role is contained in every database, including msdb, tempdb, model, and all user databases except in the master database for security purposes.

  4. The public role cannot have users, groups, or roles assigned to it.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The public role exists in EVERY database, INCLUDING master. Options A, B, and D are all true statements about the public role: it captures default permissions, cannot be dropped, and cannot have members assigned. Option C is false (and thus the correct answer) because it incorrectly claims the public role is NOT in master.

Multiple choice sql-server
  1. Using DTS Import

  2. Using bcp -out and use bcp -in to insert the data into the new SQL 7 Server

  3. Use the DTS Export

  4. Using bcp -copy, copy the data from the SQL 6.5 Server to the SQL 7 Server

  5. Both A and B

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

SQL Server 7.0 introduced DTS (Data Transformation Services), which can import data from SQL 6.5. Alternatively, bcp (bulk copy program) with -out to export from 6.5 and -in to import to 7.0 works across versions. DTS Export is for exporting data OUT, not importing. There is no 'bcp -copy' command - the correct syntax is bcp -out and bcp -in.

Multiple choice sql-server
  1. Rebuild Master database

  2. Edit registry

  3. Run regrebld.exe

  4. Restore registry from backup

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The -f flag starts SQL Server with minimal configuration, which may exclude network libraries. regrebld.exe rebuilds the registry entries for SQL Server, restoring proper network configuration. Rebuilding the master database (A) is extreme and would lose all configuration. Manually editing (B) or restoring (D) the registry is risky and unnecessary when regrebld.exe automates this correctly.

Multiple choice sql-server
  1. DBCC CHECKDB

  2. DBCC NEWALLOC

  3. DBCC CHECKALLOC

  4. DBCC CHECKCATALOG

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

DBCC CHECKDB is the primary command used to check the logical and physical integrity of all objects in the database, including verifying that index pages are correctly sorted and that offsets are reasonable. CHECKALLOC focuses specifically on disk space allocation structures.

Multiple choice sql-server
  1. All committed transactions that are in the transaction log

  2. All uncommitted transactions that are in the transaction log

  3. All committed transactions that are in the transaction log between the last checkpoint and the failure

  4. All committed transactions that are in the transaction log between the last two checkpoints

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SQL Server recovery rolls forward committed transactions from the transaction log since the last checkpoint, ensuring durability. Transactions before the last checkpoint were already written to data files. Uncommitted transactions (B) are rolled back, not forward. Option A is incorrect because transactions before the checkpoint are already on disk. Option D is incorrect - recovery uses the last checkpoint, not the interval between two checkpoints.

Multiple choice sql-server
  1. C:MSSQL7LOGERROR.LOG

  2. C:MSSQL7ERROR.LOG

  3. C:MSSQL7SQLSTP.LOG

  4. Windows NT Event Log-Application Log

  5. Windows NT Event Log-System Log

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

When SQL Server fails to start on a Windows NT/2000 system, the Application Log within the Windows Event Viewer is the primary place to find service-level errors. While SQL's own ERRORLOG is useful, the Event Log captures the initial service startup failure details.

Multiple choice sql-server
  1. When the xp_logevent stored procedure is invoked

  2. When sp_addmessage or sp_altermessage define errors to be written to the NT application log

  3. When SQL Server errors occur with severity levels between 19 and 25

  4. When the RAISEERROR WITH LOG statement is executed

  5. All of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

SQL Server writes to the Windows NT application log through multiple mechanisms. The xp_logevent extended stored procedure explicitly logs custom messages. System stored procedures sp_addmessage and sp_altermessage can configure error messages to write to the NT log. SQL Server automatically logs errors with severity levels 19-25 (critical errors). The RAISERROR WITH LOG statement also forces logging. Since all four methods are valid, option E is correct.

Multiple choice sql-server
  1. SQL Server Enterprise Manager

  2. SQL Server Transact

  3. SQL Server Network Client

  4. SQL Server Query Analyzer

  5. Both A and D

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

SQL Server Enterprise Manager is the main administrative console that shows server status and registered servers. SQL Server Query Analyzer allows you to execute test queries against the server; successful queries confirm the server is running. Both tools are valid for verification.

Multiple choice sql-server
  1. Replication management

  2. Job execution

  3. Notification

  4. Alert management

  5. All of the above

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

SQL Server Agent is a scheduling and automation service that performs job execution (scheduled tasks), alert management (responding to SQL Server events), notification (sending alerts to operators), and replication management (automating replication tasks). All listed functions are performed by the Agent.

Multiple choice sql-server
  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Windows NT Authentication mode requires the client to be part of a Windows NT domain and support integrated security. Windows 98 workstations cannot participate in Windows NT authentication; they must use SQL Server authentication with a username and password.

Multiple choice sql-server
  1. Just upgrade normally to SQL Server 7

  2. Use SQL 6.5 Transfer Management Tool to push the data and objects from version 4.2 to 7

  3. Upgrade the server to SQL Server 6.5, then upgrade again to SQL Server 7

  4. Use the DTS to transfer the data and objects

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

SQL Server 7.0 does not support a direct upgrade path from version 4.2. The standard procedure requires upgrading the 4.2 instance to version 6.5 first, and then using the SQL Server Upgrade Wizard to move to version 7.0.