Chapter 3 Flashcards

1
Q

What is the most widely used model in database management?

A

Relational model

Vendors include Microsoft, Oracle, IBM, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are legacy systems in older database models?

A

Examples include IBM’s IMS (Information Management System) and hierarchical model

Recent competitors include object-oriented models like ObjectStore, Versant, Ontos.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the object-relational model?

A

A synthesis emerging from relational and object-oriented models

Supported by Oracle, IBM DB2, MS SQL Server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a relational database?

A

A set of relations (tables)

Each relation consists of a schema and an instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define the two parts of a relation.

A
  • Schema: specifies name of relation, plus name and type of each column
  • Instance: a table, with rows and columns.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the cardinality of a relation represent?

A

The number of rows in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does the degree of a relation represent?

A

The number of fields (columns) in a relation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: All rows in a relation must be distinct.

A

True.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a major strength of the relational model?

A

Supports simple, powerful querying of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is SQL?

A

A popular high-level query language used in relational databases.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

List the major revisions of SQL.

A
  • SQL-86
  • SQL-89 (minor revision)
  • SQL-92 (major revision)
  • SQL-1999 (major extensions)
  • SQL-2003 (minor revision)
  • SQL-2008 (minor revision)
  • SQL-2011 (minor revision)
  • SQL-2016 (latest release)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What SQL command is used to create a new table?

A

CREATE TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Fill in the blank: The SQL command to insert a single tuple is _______.

A

INSERT INTO

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What SQL command is used to delete tuples from a table?

A

DELETE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What SQL command is used to modify existing tuples?

A

UPDATE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Write the SQL query to find all students aged 18.

A

SELECT * FROM Students S WHERE S.age=18

17
Q

What does the following SQL query compute? SELECT S.name, E.cid FROM Students S, Enrolled E WHERE S.sid=E.sid AND E.grade=’A’

A

The names of students and their course IDs for those who received an ‘A’.

18
Q

What SQL command destroys a table?

A

DROP TABLE

19
Q

What SQL command alters a table’s schema?

A

ALTER TABLE