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
- properties that describe the entities
Attributes
26
A collection of entities that have the same attributes
Entity Type
27
A collection of entities of a particular entity type at a point in time.
Entity Set
28
An attribute that is capable of identifying each entity uniquely.
Key Attribute
29
6 types of Attributes
Composite Attributes Simple Attributes Single-valued Attributes Multivalued Attributes Stored Attributes Complex Attributes Derived Attributes
30
Can be divided into further parts (Name -> first,last,middle)
Composite Attribute
31
cannot be divided further(Weight)
Simple Attribute
32
have a single value for a particular entity. (Age)
Single-valued Attributes
33
can have set of values for a particular entity (Languages Known of person x)
Multivalued Attributes
34
- can be derived from other attributes (Age can be derived from birthdate)
Derived Attributes
35
- From which the value of other attributes are derived
Stored Attributes
36
- Has multivalued and Composite components in it.
Complex Attributes
37
In a complex attribute, how are multivalued attributes represented by
{ }
38
In a complex attribute, how are composite attributes represented by
( )
39
All simple attributes are single-valued, but __________________
not all single-valued attributes are simple.
40
Simple attributes are a subtype of what
Single valued Attributes
41
42
What is a database
is a collection of related data
43
DATA
collection of facts and figures that can be processed to produce information.
44
This type of data is called structured data.
Data
45
Most important structured data types are
NUMERIC CHARACTER STRING DATE
46
Structured data are stored in
Tabular form
47
capture the nature of and relationships among data and are used at different levels of abstraction as a database is conceptualized and designed.
Data Models
48
A well-structured database establishes the ____ between entities that exist in organizational data so that desired information can be retrieved
Relationships
49
program that digitally stores and analyzes data
Relational Database
50
What store information in tables made up of rows and columns, similar to a spreadsheet.
Relational database
51
are automated tools used to design databases and application programs.
Data modeling and design tools
52
These tools help with creation of data models and in some cases can also help automatically generate the “code” needed to create the database.
Data modelling And design tools
53
centralized knowledge base for all data definitions, data relationships, screen and report formats, and other system components
Repository
54
A repository contains an extended set of ________ important for managing databases as well as other components of an information system.
Metadata
55
a software system that is used to create, maintain, and provide controlled access to user databases.
DBMS
56
A database is an organized collection of _______, usually designed to meet the information needs of multiple users in an organization.
Logically related data
57
create and maintain the database and provide information to users.
Computer based application program
58
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.
User interface
59
are persons who are responsible for the overall management of data resources in an organization.
Data Administrators
60
Data admins are responsible for _______ and for managing technical issues in the database environment.
physical database design
61
are persons such as systems analysts and programmers who design new application programs.
System Developers
62
are persons throughout the organization who add, delete, and modify data in the database and who request or receive information from it.
End users
63
This is the highest level of database abstraction.
External or View Level
64
describes the actual view of data that is relevant to the particular us
External or view level
65
What level describes the structure of the whole database
Conceptual or Logical Level
66
This level acts as a middle layer between the physical storage and user view.
Conceptual or Logical Level
67
It explains what data to be stored in the database, what relationship exists among those data, and what the datatypes are.
Conceptual or Logical Level
68
There is only ___ conceptual schema per database
One
69
They work in the Conceptual or Logical Level
Database administrators and the programmers
70
This level does not provide any access or storage details but concentrates on the r
Relational model of the database
71
This is the lowest level of database abstraction
Internal or Physical Level
72
It describes how the data is actually stored in the database and provides methods to access data from the database.
Internal or Physical Level
73
It allows viewing the physical representation of the database on the computer system.
Internal or Physical Level
74
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.
Interface