U8 Databases Flashcards

1
Q

what is a File-based system?

A

Data stored in discrete files, stored on computer, and can be accessed, altered or removed by user

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

Disadvantages of file based system:

A
  • No enforced control on structure of files
  • Data repeated in different files
  • Sorting must be done manually
  • Data may be in different format
  • Can’t be multi user - can become chaotic
  • Security not sophisticated; user accesses everything
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a database?

A

Collection of non-redundant, inter-related data

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

What is a DBMS?

A

Software programs that allow databases to be constructed, defined and manipulated

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

Features of DBMS:

A

Data management, Data dictionary, Data modelling, Data integrity, Data security

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

What is data management?

A

Data stored in relational databases - tables in secondary storage

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

What does data dictionary do and have in it?

A

Stores metadata about the database. Has field names, table name, primary/secondary keys etc.

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

What is data modelling?

A

Analysis of data objects used in database and identifying relationships between them

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

What is a logical schema?

A

Overview of database structure, models the problem and independent of any particular DBMS

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

What is data integrity in DBMS?

A

Entire block copied to user’s area when being changed, saved back when done

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

What is data security in DBMS?

A

Handles password allocation and verification, backups database automatically. controls user’s view by access rights of individuals or groups of users.

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

What are the tools in a DBMS?

A

Developer interface and Query processor

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

What is the developer interface?

A

Allows creating and manipulating database in SQL, rather than graphically

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

What is the query processor?

A

Handles high-level enquiries. Parses, validates, optimises, and compiles/interprets a query which results in a query plan

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

What is an entity?

A

Object/event which can be distinctly identified

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

What is a table?

A

Contains group of related entities in rows and columns called an entity set

17
Q

What is a tuple?

A

Row or record in a relational database

18
Q

What is an attribute?

A

Field or column in a relational database

19
Q

What is a primary key?

A

Attribute or combination of them that relates 2 different tables

20
Q

What is a candidate key?

A

Attribute that can potentially be a primary key

21
Q

What is a foreign key?

A

Attribute or combination of them that can relate 2 different tables

22
Q

What is referential integrity?

A

Prevents users or applications from entering inconsistent data

23
Q

What is the secondary key?

A

Candidate keys not chosen as a primary key

24
Q

What is indexing?

A

Creating secondary keys on an attribute to provide full access when searching on that attribute

25
Q

Creating a database

A

CREATE DATABASE <database-name></database-name>

26
Q

Creating a table

A

CREATE TABLE <table-name> (…)</table-name>

27
Q

Changing a table

A

ALTER TABLE <table-name></table-name>

28
Q

Adding a primary key

A

PRIMARY KEY (field)
ADD <field-name>:<data-type></data-type></field-name>

29
Q

Adding a foreign key

A

FOREIGN KEY (field) REFERENCES <table>(field)

30
Q

Adding data to a table

A

INSERT INTO <table-name>(field1, field2, field3)
VALUES (value1, value2, value3)</table-name>

31
Q

Deleting a record

A

DELETE FROM <table-name>
WHERE <condition></condition></table-name>

32
Q

Updating field in a record

A

UPDATE <table-name>
SET <field-name> = <value>
WHERE <condition></condition></value></field-name></table-name>