Fineuhl Flashcards

1
Q

How does a database reach first normal form?

A

Each value must be scalar ( returns one value and there should be no repeating columns

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

How does a database reach 2nd normal form?

A

Every non key column must depend on the primary key

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

How does a database reach 3rd normal form?

A

1st and 2nd normal form must be met and all columns must refer to the primary key.

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

How do you enforce Referential integrity in the database.

A

Use declarative referential integrity or defining triggers.

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

What would violate referential integrity.

A

Deleting a row from a primary key table, inserting a row into a foreign key, update value of primary key or foreign key

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

what datatypes will store whole numbers, character

A

Integer-whole numbers. Decimal- decimal numbers.
Char-fixed string length. Varchar-max string length..

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

What relationship is most common.

One to one, one to many, many to many

A

One to many is the most common

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

What is used after Create database?

A

Go

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

What is a constraint?

A

A way to filter what data goes through.

(inline) InvoiceTotal MONEY NOT NULL CHECK(InvoiceTotal >= 0)

(bottom)
CHECK (InvoiceTotal >= 0)

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

Keyword for constraint on a column?

A

Check keyword

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

Customer order has to refer to Customer, what do you use?

A

A join/ foreign key

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

When referencing a table when making a database you must do what?

A

Create the referenced table before it is referenced.

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

Where do records come from?

A

tables

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

When planning the database, 100 east main street sc how do separate.

A

Street name, city, state, number

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

What do the CAST and CONVERT function do?

A

Cast changes one data type to another. Convert does the same thing but has more capabilities

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

Uses for the DATE function?

A

Datetime-exact date(millisecond). smalldatetime-date (minute).
Date-date

17
Q

Unicode characters

A

Nchar-fixed unicode length.
Nvarchar-max unicode length

18
Q

What is index?

A

Create index, makes a sql statement that you can use repeatedly.

19
Q

A good reason to not make an index?

A

If the column you make an index on will be constantly changing.

20
Q

What is a foreign key?

A

When a primary key is referenced.

21
Q

What does this do decimal(6,2)

A

6 is how many numbers can be put in (6). 2 is how many decimal places .00

22
Q

Action queries?

A

Select, insert, commands that change records.

23
Q

What is ddl?

A

Data definition language, defining the structure of the tables. Create database and tables, constraints,

24
Q

Identity key?

A

Sets its own values, you don’t need to input data. Useful for primary key ids, must be the int datatype.

25
Q

What is a composite key?

A

Two primary keys together make a composite key. This is called a linking table.