Voc Flashcards

1
Q

Why do we need a DB

A

Avoid redundancy
data integrity
referential integrity
deletion anomalies

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

data integrity

A

refers to the validity of data

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

avoid redundacy

A

avoid duplication of information in multiple table within the DB

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

deletion Anomalies

A

deletion of one of a table results in the deletion of unintended information

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

Referential integrity

A

ensures that relationships between table remain consistent.

cant add a record to the table that contains the foreign key unless there is a corresponding record in the linked table.

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

redundacy

A

duplication of information in multiple tables

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

insertion anomoly

A

user is unable to insert a new record when it should be possible to do so

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

deletion anomoly

A

record is deleted other information tied to the is also deleted

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

update anomoly

A

record is updated but other appearances of the same item is not updated.

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

unified modeling language

A

used to describe conceptual view of the database

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

relational model

A

formal model of the database

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

relational algebra

A

a formal language used to symoblically manipulate objects of the relational model

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

tabel model

A

informal set of terms for relational model objects. terms used to refer to the physical view of the database

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

structured query language

A

is used to build and manipulate relational databases. based on relational algebra. its is declarative. stadard but some products very on implementatin.

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

uml class or entity

A

anything in that is to be represented in the db

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

first step of building a db

A

model it in natural language

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

attribute

A

is a piece of inofrmation that characterizes each member of a class

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

descriptive atttributes/ natural attributes

A

those which actually provide real world information about the class. id numbers are not descriptive

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

class diagram

A

shows the class and its attributes

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

relational scheme

A

starts with the attributes from the class diagram.

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

sets

A

domain of all the attributes that belong to a class.

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

Create table nameTable()

A
creates a table;
CREATE TABLE customers ( 
	cfirstname VARCHAR(20) NOT NULL, clastname VARCHAR(20) NOT NULL, cphone VARCHAR(20) NOT NULL, 
	cstreet VARCHAR(50), 
	czipcode VARCHAR(5));
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

data models

A

conceptual, logical, physical

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

rows

A

each instance of the class is represented by a row.

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

tuple

A

each row is defined in a relational database by a tuple. assigning values to each col.

26
Q

atomicity

A

prinicple that each tuple only has one piece of data

27
Q

example of assignments in tuples

A

insert into customer (cfirstname, clastname, cphone, cstreet, czip)
values (‘tom’, ‘jewet’, ‘714-555-5555’, ‘100200 slater’, ‘92045’);

28
Q

example update

A

update customers set cphone=714-555-4444’ where cphone=’714-555-5555’;

29
Q

uniqueness

A

each row is unique no duplicates

30
Q

unordered

A

we can display them in any order we wantand the meaning does change. we can sort by whatever we want.

31
Q

filter

A

we can include subsets of rows by specifying criteria

32
Q

superkey

A

each row must be unique so a set of attributes in each relation scheme mus guarantee uniqueness.

33
Q

primary key

A

a unique identifier of each row. picked from the super keys

34
Q

example add primary key

A
alter table customers 
add constraint customer_pk
primary key (cfirstname, clastname, cphone);
35
Q

example of ensuring uniqueness with one statement.

A
CREATE TABLE customers ( 
	cfirstname VARCHAR(20) NOT NULL, 
	clastname VARCHAR(20) NOT NULL, 
	cphone VARCHAR(20) NOT NULL, 
	cstreet VARCHAR(50), 
	czipcode VARCHAR(5)), 
	CONSTRAINT customers_pk
	PRIMARY KEY (cfirstname, clastname, cphone);
36
Q

association/ relationship

A

the way that two classes are functionally connected to each other.

37
Q

mulitplicity/cardinality

A

how few or how many of one class is connected to another class

38
Q

foreign key

A

the primary key of the parent association

one side is always the parent. and provides the pk attributes to be copied. the many side is the child

39
Q

pk get copied to child as fk mando if

A

the relationship is mandotory. if its a 1 to * relationship. and information is needed to uniquely identify child

40
Q

identifying

A

attibutes must be not null

41
Q

referential integrity

A

ensuring that every fk is connected to the right primary key of the parent.

42
Q

identifying2

A

if the foreign key is part of the primary key then its identifying

43
Q

non identifying

A

if fk is not part of the primary key

car example. driver can exist without a car and a car can exist without a driver.

44
Q

candidate key

A

minimal super key; meaning if you take one attribute away from the set it is no longer unique

45
Q

surrogate Pk

A

a single small attribute such as a number that has no descriptive value such as an id number

46
Q

substitute pk

A

a single small attribute such as an abbreviation that has at least some descriptive value

47
Q

3 rules for substitute and surrogate key addition

A
  1. have at least one candidate key
  2. is a parent
  3. no candidate key small enough for its values to be copied many times into child table. ( to big)
48
Q

external key

A

already defined by someone else surrogate keys zip codes isbn upc

49
Q

social security

A

only use as non key feild if required by law

50
Q

discriminator attribute

A

or partial key) of a weak entity set is the set of attributes that distinguishes among all the entities of a weak entity set on one particular strong entity.

51
Q

normalization

A

following a procedure or set of rules to insure that a database is well designed. most normalization is to eliminate redundatnt data

52
Q

subkeys always result in redundancy

A

eliminate it for 3rd normal form

53
Q

signs that you have multiple values attribute

A

variable length is long
plural
values have a delimiter,
pay attention to order

54
Q

ensureing data integrity

A

values entered in each field of a table is consistent with its attribute domain.

55
Q

validation rule

A

constraints on the type of data inserted into col

56
Q

lookup table

A

tables created for the pupose of storeing enumerated domains

57
Q

enumerated domains

A

attribute domains that may be specified by a well defined reasonable size set of constant values

58
Q

data definition language (ddl)

A

used to build and modify the structure of your tables and other objects in the database

59
Q

data manipulation language (dml)

A

used to work with data in tables

60
Q

data dictionary

A

contains all information about object in your schema

61
Q

data types

A

specifies the type of data that an attribute is

62
Q

cross join

A

in set theory is a cartesian product