Playing as a guest? to earn XP and track your progress.
๐๏ธ Database Concepts Quiz
๐๏ธ Database Concepts
Storing the same data in many files is called:
Data security
Data integrity
Data sharing
Data redundancy
Redundancy means unnecessary duplication of data.
When a student's address is changed in one file but not in another, it causes:
Data sharing
Data recovery
Data security
Data inconsistency
Inconsistency means the copies of the same data don't match.
Data scattered in different files with different formats, making it hard to bring together, is called:
Data isolation
Data integrity
Data redundancy
Data independence
Isolated data is difficult to combine and use.
Which is NOT a limitation of the file system?
Data redundancy
Data isolation
Data inconsistency
Easy sharing and strong security
The file system has poor sharing and security; a DBMS solves these problems.
The memory trick RIDDS for file system problems stands for:
Rows, Indexes, Data, Domains, Schemas
Redundancy, Inconsistency, Data isolation, Difficult access, Security and sharing issues
Read, Insert, Delete, Drop, Select
Records, Integrity, Degree, Domain, SQL
These are the five limitations of a file system listed in the notes.
An organised collection of related data is called a:
Program
Spreadsheet cell
Operating system
Database
A database stores related data in an organised way.
Software used to create, manage and protect a database is called a:
Device driver
Compiler
Browser
DBMS
DBMS stands for Database Management System.
DBMS stands for:
Database Management System
Data Backup Management Software
Digital Base Memory System
Database Monitoring Service
A DBMS manages databases.
Which of these is a DBMS?
MS Paint
MySQL
Python
Google Chrome
MySQL, Oracle, SQL Server, PostgreSQL and SQLite are DBMS software.
Which is an advantage of a DBMS?
Easy sharing of data
Less data redundancy
Better data security
All of the above
A DBMS reduces redundancy, keeps data consistent and secure, and allows sharing and backup.
A DBMS allows only authorised users to see certain data. This advantage is:
Data security
Data inconsistency
Data isolation
Data redundancy
Passwords and permissions protect the data.
Rules that keep data correct and valid (e.g. marks cannot be negative) ensure:
Data duplication
Data integrity
Data redundancy
Data isolation
Integrity means the data stays accurate and valid.
Where are databases used?
Banks
Railway reservation
School records
All of the above
Banks, railways, schools, hospitals and online shops all use databases.
In the relational data model, data is stored in:
Trees
Graphs only
Text files
Tables (relations)
The relational model organises data as tables called relations.
In the relational model, a table is called a:
Tuple
Relation
Attribute
Domain
A relation is a table of rows and columns.
A column of a relation is called a(n):
Tuple
Relation
Cardinality
Attribute
Each column (field) is an attribute.
A row of a relation is called a(n):
Domain
Tuple
Attribute
Degree
Each row (record) is a tuple.
The set of all allowed values for an attribute is called its:
Cardinality
Degree
Key
Domain
Example: the domain of Gender could be {M, F}.
The number of ATTRIBUTES (columns) in a relation is called its:
Cardinality
Domain
Tuple
Degree
Degree = number of columns.
The number of TUPLES (rows) in a relation is called its:
Attribute
Degree
Cardinality
Domain
Cardinality = number of rows.
A table has 5 columns and 8 rows. What are its degree and cardinality?
Degree 13, cardinality 40
Degree 40, cardinality 13
Degree 8, cardinality 5
Degree 5, cardinality 8
Degree counts columns; cardinality counts rows.
A relation has degree 4 and cardinality 10. If 2 rows are added, what is the new cardinality?
6
12
14
10
Adding rows increases cardinality; the degree stays 4.
A relation has degree 4 and cardinality 10. If one column is added, what is the new degree?
10
5
11
4
Adding a column increases the degree by 1.
Which is a property of a relation?
Two columns can have the same name
No two rows are exactly the same
Row order is fixed and important
A cell can hold many values
Rows are unique, column names are unique, order does not matter and values are atomic.
Does the ORDER of rows in a relation matter?
Only for numbers
Yes, always
No
Only for the first row
Rows (and columns) can be in any order in a relation.
Each cell of a relation holds one single (indivisible) value. Such values are called:
Domains
Keys
Atomic values
Multiple values
A cell should not hold a list of values.
A value that is unknown or not applicable is stored as:
NULL
Empty quotes ""
NONE
0
NULL means 'unknown'; it is not the same as 0 or a blank.
Is NULL the same as 0?
No, NULL means unknown or no value
Only in number columns
Only in text columns
Yes, always
0 is a known value; NULL means the value is not known.
An attribute (or group of attributes) that can uniquely identify each row is a:
Tuple
Foreign key
Domain
Candidate key
Every attribute set that is unique and not NULL is a candidate key.
The candidate key CHOSEN to uniquely identify rows of a table is the:
Composite domain
Foreign key
Alternate key
Primary key
Only one candidate key is chosen as the primary key.
Candidate keys that are NOT chosen as the primary key are called:
Super domains
Alternate keys
Tuples
Foreign keys
Candidate keys = primary key + alternate keys.
Which formula is correct?
Candidate keys = Primary key + Alternate keys
Alternate keys = Primary key + Foreign key
Primary key = Candidate keys + Foreign keys
Foreign key = Primary key + Candidate key
All candidate keys except the primary key are alternate keys.
Which properties must a primary key have?
Can be NULL but unique
Unique and NOT NULL
Can repeat and be NULL
Can repeat but not NULL
Every row must have a primary key value, and no two rows can share it.
How many primary keys can a table have?
Two
Any number
None
Only one
A table has only one primary key (it may be made of more than one column).
An attribute in one table that refers to the primary key of another table is a:
Foreign key
Domain
Candidate key
Alternate key
A foreign key links two tables.
Which statement about a foreign key is TRUE?
It must always be unique
A table can have only one foreign key
It can never be NULL
It can have repeated values and can be NULL
Many rows can refer to the same parent row, so foreign key values can repeat.
The table whose primary key is referred to by a foreign key is called the:
Parent (referenced) table
Child table
Domain table
Alternate table
The table containing the foreign key is the child; the referenced one is the parent.
STUDENT(RollNo, Name, AdmNo, Phone): RollNo, AdmNo and Phone are all unique. If RollNo is made the primary key, AdmNo and Phone are:
Alternate keys
Not keys
Primary keys
Foreign keys
They are candidate keys not chosen as primary, so they are alternate keys.
STUDENT(RollNo, Name, AdmNo, Phone): which of these is the WORST choice for a key?
Name
RollNo
AdmNo
Phone
Two students can have the same name, so Name cannot uniquely identify a row.
EMP(EmpID, Name, DeptNo) and DEPT(DeptNo, DName). DeptNo is the primary key of DEPT. In EMP, DeptNo is a:
Primary key
Foreign key
Candidate key
Alternate key
EMP.DeptNo refers to the primary key of DEPT.
Can two employees in EMP have the same DeptNo (a foreign key)?
No, foreign keys must be unique
Only in the DEPT table
Only if DeptNo is NULL
Yes, many employees can work in the same department
Foreign key values can repeat.
Which column is the best primary key for a BOOK table?
Price
Author
BookID
Title
Titles, authors and prices can repeat; BookID is unique for every book.
Which key is used to LINK two tables together?
Alternate key
Domain
Candidate key
Foreign key
A foreign key in one table refers to the primary key of another table, linking them.
Which term means the same as 'record'?
Tuple
Degree
Domain
Attribute
A record is a row, which is a tuple.
Which term means the same as 'field'?
Attribute
Relation
Cardinality
Tuple
A field is a column, which is an attribute.
Which statement about a DBMS is FALSE?
It keeps data consistent
It increases data redundancy
It allows data sharing
It provides backup and recovery
A DBMS reduces redundancy.
In a relation, can two columns have the SAME name?
No, every column name must be unique
Only for the primary key
Only if they hold numbers
Yes, always
Attribute names in a relation are unique.
Which of these is a good example of a domain?
The table name
The primary key
The number of rows
The set of valid class sections {A, B, C, D}
A domain is the set of allowed values for an attribute.
A relation STUDENT has 6 attributes and 0 tuples. What is its cardinality?
1
NULL
0
6
An empty table has no rows, so its cardinality is 0.
Which of these is NOT a DBMS?
MS Paint
PostgreSQL
Oracle
SQLite
MS Paint is a drawing program.
A DBMS that stores data in the form of related tables is called a(n):
Spreadsheet
Web browser
RDBMS (Relational DBMS)
File system
MySQL is an RDBMS.
Why is a DBMS better than keeping data in separate files?
It works only offline
It needs no computer
It controls redundancy and keeps data consistent and secure
It deletes old data automatically
A DBMS overcomes the limitations of the file system.
A bank customer's balance must never be different in two places. This is achieved through:
Data redundancy
Data deletion
Data isolation
Data consistency
Consistency means all copies of data agree.
In a school database, which attribute is MOST suitable as a foreign key in the MARKS table to link it with STUDENT?
Name
RollNo
Subject
Marks
RollNo is the primary key of STUDENT, so MARKS.RollNo can refer to it.