Basics of databases Flashcards

(32 cards)

1
Q

What is an ANSI/SPARC structure?

A

A proposed framework for DBMS
- Internal level
- Conceptual level
- External level

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

Explain the Internal level in the ANSI structure

A
  • Physical storage of data
  • Structure of records on disk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain the conceptual level in the ANSI structure

A

Deals with the organisation of the entire database content
(CREATE table vibes)

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

Explain the external level in the ANSI structure

A

Provides a view of the database tailored to a user
(CREATE view vibes)

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

What are the advantages of using a database?

A
  • Data integrity
  • Data consistency
  • Enforcement of standards
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the stages of the system development life cycle (SDLC)?

A

Planning
Analysis
Design
Implementation
Maintenance

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

What is a conceptual schema?

A

Users can see what data is stored in the database and the relationship between data

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

What is a DBMS?

A

Stores, modifies and retrieves data

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

What is SQL made up of?

A

DDL
DML
DCL

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

What is DDL?

A

Data definition language (actual STRUCTURE of database)
- CREATE
- ALTER
- DROP

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

What is DML?

A

Data manipulation language (manipulating the data- a level stuff)
- SELECT
- INSERT
- DELETE
- UPDATE

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

What is DCL?

A

Data control language (access)
- GRANT
- REVOKE

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

What are the three types of data model?

A

Hierarchal
Network
Relational

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

Explain the hierarchal data model

A

Data organised in a tree structure
- DOM

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

Explain the network data model

A

Data organised in a loose network

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

Explain the relational data model

A

Data organised into sets

17
Q

What is a relation?

A

A table with columns and rows

18
Q

What is an attribute?

A

A named column of a relation

19
Q

What is a domain?

A

Set of allowable values for one or more attributes

20
Q

What is a tuple?

A

A row in a relation
- Attribute name rows don’t count

21
Q

What is the degree of a relation?

A

The number of attributes the relation contains

22
Q

What is the cardinality?

A

Number of tuples the relation contains

23
Q

What is a relational database?

A

A collection of normalised relations with distinct relation names

24
Q

What is a candidate key?

A

A single key or group of multiple keys uniquely identifying table rows

25
What is a primary key?
A candidate key that is selected to identify tuples uniquely in a relation
26
What is a foreign key?
An attribute, or set of attributes within one relation that matches the candidate key of some relation
27
How do we maintain data integrity?
- Restrict domain - Candidate and primary keys identify tuples - Foreign keys link relations to each other
28
What is NULL?
Represents a value for an attribute that is currently unknown or is not applicable
29
What is entity integrity?
In the base relation, no attribute of the primary key can be NULL and must be unique
30
What is referential integrity?
If a foreign key exists in a relation, either the foreign key value must match a candidate key value or it must be NULL
31
What are three ways we can deal with maintaining referential integrity?
Restrict - Stop user from changing the values in candidate keys Cascade - Let the changes flow Nullify - Make values in foreign key NULL
32
How do we logically connect two tables together?
Common attribute