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
tuple
each row is defined in a relational database by a tuple. assigning values to each col.
26
atomicity
prinicple that each tuple only has one piece of data
27
example of assignments in tuples
insert into customer (cfirstname, clastname, cphone, cstreet, czip) values ('tom', 'jewet', '714-555-5555', '100200 slater', '92045');
28
example update
update customers set cphone=714-555-4444' where cphone='714-555-5555';
29
uniqueness
each row is unique no duplicates
30
unordered
we can display them in any order we wantand the meaning does change. we can sort by whatever we want.
31
filter
we can include subsets of rows by specifying criteria
32
superkey
each row must be unique so a set of attributes in each relation scheme mus guarantee uniqueness.
33
primary key
a unique identifier of each row. picked from the super keys
34
example add primary key
``` alter table customers add constraint customer_pk primary key (cfirstname, clastname, cphone); ```
35
example of ensuring uniqueness with one statement.
``` 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
association/ relationship
the way that two classes are functionally connected to each other.
37
mulitplicity/cardinality
how few or how many of one class is connected to another class
38
foreign key
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
pk get copied to child as fk mando if
the relationship is mandotory. if its a 1 to * relationship. and information is needed to uniquely identify child
40
identifying
attibutes must be not null
41
referential integrity
ensuring that every fk is connected to the right primary key of the parent.
42
identifying2
if the foreign key is part of the primary key then its identifying
43
non identifying
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
candidate key
minimal super key; meaning if you take one attribute away from the set it is no longer unique
45
surrogate Pk
a single small attribute such as a number that has no descriptive value such as an id number
46
substitute pk
a single small attribute such as an abbreviation that has at least some descriptive value
47
3 rules for substitute and surrogate key addition
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
external key
already defined by someone else surrogate keys zip codes isbn upc
49
social security
only use as non key feild if required by law
50
discriminator attribute
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
normalization
following a procedure or set of rules to insure that a database is well designed. most normalization is to eliminate redundatnt data
52
subkeys always result in redundancy
eliminate it for 3rd normal form
53
signs that you have multiple values attribute
variable length is long plural values have a delimiter, pay attention to order
54
ensureing data integrity
values entered in each field of a table is consistent with its attribute domain.
55
validation rule
constraints on the type of data inserted into col
56
lookup table
tables created for the pupose of storeing enumerated domains
57
enumerated domains
attribute domains that may be specified by a well defined reasonable size set of constant values
58
data definition language (ddl)
used to build and modify the structure of your tables and other objects in the database
59
data manipulation language (dml)
used to work with data in tables
60
data dictionary
contains all information about object in your schema
61
data types
specifies the type of data that an attribute is
62
cross join
in set theory is a cartesian product