Relational data structure - correct answer ✔A table has a name, a fixed tuple
of columns, and varying sets of rows.
A column has a name and a data type.
A row is a unnamed set of values. Each corresponds to a column and belongs
to the columns data type.
A data type is a name set of values, from which column values are drawn.
Similar concepts in databases - correct answer ✔DATABASES
MATHEMATICS FILES
table relation file
column attribute field
row tuple record
data type domain data type
Can a query select one specific row from a table? - correct answer ✔A query
selects a specific row by specifying one or more row values. Ex:
SELECT EmployeeName FROM Employee WHERE EmployeeID = 2594;
What is the result of a relational operation? - correct answer ✔What is the
result of a relational operation?
Name some operational operations - correct answer ✔Select, Project,
Product, Join, Union, Intersect, Difference, Rename, Aggregate
,An SQL statement can implement only one relational operation. T/F - correct
answer ✔FALSE
- Most SQL queries implement several operations. Ex: SELECT Name FROM
Employee WHERE Salary > 50000; implements both a select and a project
operation.
Unique primary key is an example of a relational rule.
T/F - correct answer ✔All relational tables should have a column with a
primary key.
primary keys identify individual rows.
Delete cascade is an example of a relational rule.
T/F - correct answer ✔FALSE
-Delete cascade is a business rule, not a relational rule. The delete cascade
rule requires that, when a row of a particular table is deleted, all related rows
are also deleted. Deleting related rows depends on business policy, and may
apply to some tables but not others.
Data in a relational database can violate relational rules.
T/F - correct answer ✔True
-Depending on how tables are specified, some relational rules can be violated.
Ex: A table with no primary key can be created. However, rule violations often
create business problems and should normally be avoided or automatically
prevented.
, All tables must have a primary key with no repeated values.
R or B rule - correct answer ✔Relational rule
All rows in a particular column must have known values.
R or B rule - correct answer ✔Business rule
Different columns of the same table must have different names. R or B rule -
correct answer ✔Relational rule
A database designer and database user both use SQL.
T/F - correct answer ✔True
-Designers use SQL to create the database and tables
-The users uses SQL to insert, retrieve, update, and delete from the tables.
All database systems use identical SQL statements
T/F - correct answer ✔FALSE
- SQL implementations differs in small ways between databases.
- correct answer ✔Literals - Explicit values that are string, numeric, or binary
.Strings must be surrounded by single quotes or double quotes.Binary values
are represented with x'0' where the 0 is any hex value .
Ex: 'String' "String" 123 x'0fa2'