Databases and SQL Exam With 100%
Correct Answers
What is a database? - correct answers ✔✔A database is a computerised system that makes it
easy to search, select and store information. Databases store data and information in tables
which are made up of records and fields
What is a record - correct answers ✔✔This is all the information in a database about 1 person
or thing
What is a field? - correct answers ✔✔This is a single piece of information in a databse about a
person or thing (a cell in a table)
What is an attribute? - correct answers ✔✔Each column in a table is called in a table is called an
attribute and contains
What is a tuple? - correct answers ✔✔This is a row in a table and it is a dataset that applies to a
single item
What is an entity? - correct answers ✔✔This is a table in a database is called an entity
What is a primary key? - correct answers ✔✔This is a field in a table which is unique and
enables you to identify every record in that table
What is a foreign key? - correct answers ✔✔This is an attribute or collection of attributes whose
values are intended to match the primary key of a different table
, What is a composite primary key? - correct answers ✔✔This is where two separate attributes in
a table combine to create a primary key
What is an entity relationship diagram? - correct answers ✔✔This shows relationships between
entities in a database. This, in turn, illustratesthe logical structure of a database. There are only
a number of ways Relationships can be established in a database
What is a one to one relationship? - correct answers ✔✔This shows each entity in the
relationship will having exactly one related entity. This type of relationship isn't common as
usually most information in related
What is a one to many relationship? - correct answers ✔✔In this case, one entity may be
related to many instances of another entity.
What is a many to many relationship? - correct answers ✔✔In this case each entity is related to
many instances of the other entity. However, this type of relationship can't exist in a database
so a third link entity must be created to relate the two main entities to each other
What is the SQL command to create a table? - correct answers ✔✔CREATE TABLE tblName
(
)
What kind of variable is defined by CHAR(n)? - correct answers ✔✔This is a character string of
fixed length n
What kind of variable is defined by VARCHAR(n)? - correct answers ✔✔This is a character string
of variable length, max n