database final Flashcards

(53 cards)

1
Q

entity is what

A

is some identifiable thing that users want to track

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

functional dependency

A

occurs when the value of one set of attributes determines the value of a second set of attributes

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

what is an example of functional dependency

A

studentID is a determinent of studentName

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

composite determinant

A

a determinant of a functional dependency that consists of more than one attribute for example student name and class name to determine grade

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

compostie key

A

is a key that consists of two or more columns

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

candidate key

A

is a key that determines all of the other columns in a relation from the candidate keys the designer selects one to be the PK

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

primary key

A

is a candidate key selected as the primary means of uniquely identifying a row in a relation

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

Surrogate Key

A

is an artificial column added to the relation to serve as the primary key this is created when a good PK cannot be found.

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

foreign key

A

is the primary key of one relation that is placed in another relation to for a link between the relations.

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

referential integrity constraints

A

is a statement that limits the values of the foreign key to those already existing as primary key values in the corresponding relation.

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

what is BSNF

A

boy scott normal form this is how every database should be performed

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

select statement

A

select
from
where
;

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

means to select all columns

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

sql built in functions

A

count, sum, avg, min, max

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

quering multiple tables

A

must use joints by stateing the table and its fk = to table the the pk

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

how do you create a table in sql

A

use create table statement but dont specify any of the FK’s untill all tables have been created and the data has been input also makeing fk’s null makes life easier

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

alter table

A

used when inputing new column or fk’s

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

insert command

A

used to insert values into a table

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

update command

A

is used most often when you want to update an entry

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

data model

A

is a plan or blueprint for a database design

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

entity-relationship model

A

is a set of concepts and graphical symobols that can be used to create conceptual schemas.

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

what is and entity is a relationship model

A

this is a thing in which you want to store data like students, or employee, or courses

23
Q

an attribute in entity relationship model

A

is what describes and entity characteristics these are the columns in the table

24
Q

identifiers

A

are attributes that name or identify entity instances or the primary key these can be composite where it consists of 2 or more attributes

25
binary relationship
is a relationship that is between 2 enteties
26
a ternary relationship
is a relationship that is between 3 enteties
27
maximum cardinality
is the max number of entity instances that can participate in a relationship
28
minimum cardinality
is the minimum number of entity instances that must participatein a relationship
29
what are the types of max cardinality
one to one, one to many, many to many
30
what is the parent entity
this is the entity that is one the one side of the relationship
31
what is the child entity
this is the entity on the many side of the relastionship
32
minimum cardinality
is the minimum number of entity instances that must participate in a relationship this must be ether zero or 1
33
strong entity
is one that represents something that can exist on its own. for example department and employee represented by a dashed line.
34
weak entity
is one whose existance depends on the presence of another entity
35
ID-dependent entity
is an entity whose identifier includes the identifier of another entity. the minimum cardinality for this is always one. all id dependent entities are considered weak entities.
36
supertype entity
contains all common attributes for example the super type might be patient
37
the subtype entity
contains specific attributes also may have a discriminator attribute which indicates the subtype the sub type would be male or female and the discriminator is sex
38
exclusive subtype
means that the supertype can at most relate to one subtype
39
an inclusive subtype
means at most the supertype can relate to one or more subtypes.
40
a recursive relationship
is when the entity has a relationship to itself
41
1st step in creating data mode
create a table for each entity, specify the PK, the candidate keys, and the properties of each column i.e. null data type
42
second set in creating data model
create relationships by placing foreign keys, relastionships between sstrong entities, identifying relationships with ID-denpendencies , and relationships between strong and weak entities
43
step 3 in creating data model
specify logic for enforcing minimum cardinality i.e. many to many , one to one, or one to many
44
DBA's tasks
manage database structure, control concurrent processing, manage processing rights and responsibilities, develop database recovery, manage DBMS maintain the data repository
45
a transaction
is a series of actions taken agains the database that occurs as an atomic unit. either all occur or none of them do.
46
concurrent transaction
refers to two or more transactions that are being processed against a database at the same time
47
implicit locks
are locks placed by the DBMS
48
explicit locks
are issued by the application program
49
exclusive lock
prohibits other users from reading the locked resource
50
shared lock
allows other users to read the locked resource but they cannot update it
51
deadlock
occurs when transactions are each waiting on a resource that the other transaction holds.
52
preventing dead locks
allow users to issue all lock requests at one time repuire all application programs to lock resources inn the same order.
53
breaking deadlocks
almost every dbms has algorithms for etecting deadlock when deadlock occurs dbms aborts one of the transactions and rollbacks partialy completed work