SQL DATABASE Flashcards

1
Q

Schema

A

Describes table

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

How is each row represented in a Relational Database

A

As a Tuple

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

Represents a record of related data values

A

Each Row

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

Each row has 2 properties

A
  • Represents a record of related data values
  • Facts that typically correspond to a real-world entity or relationship
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • Facts that typically correspond to a real-world entity or relationship
A

Each Row

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

How is each column represented in a relational database

A

Attribute

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

Each column has 2 properties

A
  • Holds a corresponding value for each row
  • Slot for a specific interpretation for a row
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
  • Slot for a specific interpretation for a row
A

Each Column

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

What is a Schema

A

Describes a table (table name, attribute name, types)

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

What is an instance

A

Denotes the current contents of the table

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

Set of atomic values * {0,1,2,…} * {Jo Smith, Dana Jones, Ashley Wong, Y. K. Lee,…}

A

Domain D

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

Atomic has 2 descriptions

A
  • Each value indivisible Domain specified by Data type rather than by enumeration
  • Integer, String, Date, Real, etc. * Can be specified by format: (ddd)ddd-dddd
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A relation schema is denoted by

A

by R(A1 , A2 , …, An )

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

A relation name R and a list of attributes: A1 , A2 , …, An

A

Relation Schema

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

Name of a role in the relation schema R

A

Attribute

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

Associated with a domain dom(ai)

A

Attribute

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

(T OR F) Attribute names do not repeat within a relation schema(table) but domains can repeat.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
  • The relation (or relation state)
A

Instance

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

Number of attribute n in its relation schema

A

Degree of a relation (no. of columns)

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

Enumerate the behaviors of values in tuples (6)

A

Each value in a tuple is atomic
* Flat (as opposed to nested) relational model
* Composite and multivalued attributes not allowed
* Historically relation is said to be in First normal form (1NF) Composite attributes
* Split into simple component attributes
* e.g., Waterloo, Ontario treated as atomic or split into two attributes to store Waterloo
separately from Ontario Multivalued attributes
* Must be represented by separate relations

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

Enumerate the 4 Behaviors of Null Values

A

Assume each domain is augmented with a special NULL value
* Represent the values of attributes that may be unknown or may not apply to a tuple
Interpretations for NULL values
* Nothing is known about the value
* Value exists but is (currently) not available

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

5 basic concepts of Entity-Relationship model

A

Entity
Attributes
Entity Type
Entity Set
Key Attribute

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

A thing in the real world with an independent existence.

A

entity

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

May be an object with physical existence or with a conceptual existence

A

Entity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q
  • properties that describe the entities
A

Attributes

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

A collection of entities that have the same attributes

A

Entity Type

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

A collection of entities of a particular entity type at a point in time.

A

Entity Set

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

An attribute that is capable of identifying each entity uniquely.

A

Key Attribute

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

6 types of Attributes

A

Composite Attributes
Simple Attributes
Single-valued Attributes
Multivalued Attributes
Stored Attributes
Complex Attributes
Derived Attributes

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

Can be divided into further parts (Name -> first,last,middle)

A

Composite Attribute

31
Q

cannot be divided further(Weight)

A

Simple Attribute

32
Q

have a single value for a particular entity. (Age)

A

Single-valued Attributes

33
Q

can have set of values for a particular entity (Languages Known of person x)

A

Multivalued Attributes

34
Q
  • can be derived from other attributes (Age can be derived from
    birthdate)
A

Derived Attributes

35
Q
  • From which the value of other attributes are derived
A

Stored Attributes

36
Q
  • Has multivalued and Composite components in it.
A

Complex Attributes

37
Q

In a complex attribute, how are multivalued attributes represented by

A

{ }

38
Q

In a complex attribute, how are composite attributes represented by

A

( )

39
Q

All simple attributes are single-valued, but __________________

A

not all single-valued attributes are simple.

40
Q

Simple attributes are a subtype of what

A

Single valued Attributes

41
Q
A
42
Q

What is a database

A

is a collection of related data

43
Q

DATA

A

collection of facts and figures that can be
processed to produce information.

44
Q

This type of data is called structured data.

A

Data

45
Q

Most important structured data types are

A

NUMERIC
CHARACTER
STRING
DATE

46
Q

Structured data are stored in

A

Tabular form

47
Q

capture the nature of and relationships among data and are used at different
levels of abstraction as a database is conceptualized and designed.

A

Data Models

48
Q

A well-structured database establishes the ____ between entities
that exist in organizational data so that desired information can be retrieved

A

Relationships

49
Q

program that digitally stores and analyzes data

A

Relational Database

50
Q

What store
information in tables made up of rows and columns, similar to a spreadsheet.

A

Relational database

51
Q

are automated tools used to design databases and
application programs.

A

Data modeling and design tools

52
Q

These tools help with creation of data models and in some cases can
also help automatically generate the “code” needed to create the database.

A

Data modelling And design tools

53
Q

centralized knowledge base for all data definitions, data relationships, screen
and report formats, and other system components

A

Repository

54
Q

A repository contains an extended set of ________ important for managing databases as well
as other components of an information system.

A

Metadata

55
Q

a software system that is used to create, maintain, and provide controlled access to
user databases.

A

DBMS

56
Q

A database is an organized collection of _______, usually designed to meet the
information needs of multiple users in an organization.

A

Logically related data

57
Q

create and maintain the database and
provide information to users.

A

Computer based application program

58
Q

includes languages, menus, and other facilities by which users interact with
various system components, such as data modeling and design tools, application programs, the
DBMS, and the repository.

A

User interface

59
Q

are persons who are responsible for the overall management of data
resources in an organization.

A

Data Administrators

60
Q

Data admins are responsible for _______ and for
managing technical issues in the database environment.

A

physical database design

61
Q

are persons such as systems analysts and programmers who design new
application programs.

A

System Developers

62
Q

are persons throughout the organization who add, delete, and modify data in the
database and who request or receive information from it.

A

End users

63
Q

This is the highest level of database abstraction.

A

External or View Level

64
Q

describes the actual view of data that is relevant to the particular us

A

External or view
level

65
Q

What level describes the structure of the whole
database

A

Conceptual or Logical Level

66
Q

This level acts as a middle layer between the physical storage and user view.

A

Conceptual or Logical Level

67
Q

It
explains what data to be stored in the database, what relationship exists among those data, and
what the datatypes are.

A

Conceptual or Logical Level

68
Q

There is only ___ conceptual schema per database

A

One

69
Q

They work in the Conceptual or Logical Level

A

Database administrators and the programmers

70
Q

This level does not provide
any access or storage details but concentrates on the r

A

Relational model of the database

71
Q

This is the lowest level of database abstraction

A

Internal or Physical Level

72
Q

It describes how
the data is actually stored in the database and provides methods to access data from the
database.

A

Internal or Physical Level

73
Q

It allows viewing the physical representation of the database on the computer system.

A

Internal or Physical Level

74
Q

The ______ between the conceptual schema and the internal schema identifies how an
element in the conceptual schema is stored and how it may be accessed.

A

Interface