CS22001 - Database Systems

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/63

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:05 PM on 4/25/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

64 Terms

1
New cards

How can you show a model of a relational database?

An ERD (entity relationship diagram)

2
New cards

What is a general rule for determining entities?

Look for nouns

3
New cards

What is a general rule for determining attributes?

Find info that each entity would contain

4
New cards

What is a general rule for determining relationships?

Look for verbs

5
New cards

What are the steps for creating a database?

Requirements, Conceptual Design, Logical Design, Physical Design, Verification, Maintenance

6
New cards

Which step does an ERD fall under?

Conceptual Design

7
New cards

What is a weak entity?

An entity that would not exist without another

8
New cards
<p>Which entity is a weak entity?</p>

Which entity is a weak entity?

Contact Info

9
New cards

What is a candidate key?

A minimal set of attributes which uniquely identifies each record

10
New cards

What is a composite key?

A candidate key which consist of two or more attributes

11
New cards

What is a primary key?

A candidate key which is selected to uniquely identify each record

12
New cards

What makes a good primary key?

One attribute, a numerical attribute, named sensibly

13
New cards

What is a foreign key?

When one table has the primary key

14
New cards

What is the purpose of a foreign key?

Allows tables to be linked without physically storing the relationship

15
New cards

What is a requirement of a joining table?

Both entities have many to many relationships

16
New cards

What is the purpose of a joining table?

To model many-to-many relationships by breaking them into two one-to-many relationships

17
New cards

When does an insertion anomaly occur?

Specific data cannot be added to a table without the presence of unrelated or incomplete data

18
New cards

When does an update anomaly occur?

When data is duplicated (redundant) across multiple records, and updating only some - but not all - of those records leaves the database in an inconsistent state

19
New cards

When does a deletion anomaly occur?

When deleting a record from a database unintentionally removes other crucial, unrelated data, causing loss of information

20
New cards

What is CRUD?

Create, read, update, delete`

21
New cards

Create in SQL (2)

CREATE

INSERT INTO

22
New cards

Read in SQL

SELECT

23
New cards

Update in SQL

UPDATE

24
New cards

Delete in SQL

DELETE

25
New cards

Example insert in SQL

INSERT INTO Staff (Name, Address, Phone) VALUES ('Daniel Rough', 'Room 2.07', '384145')

26
New cards

Example update in SQL

UPDATE Staff SET Address = 'Room 2.05’, 	 Phone ='123456' WHERE Name ='Daniel Rough'

27
New cards

Example delete in SQL

DELETE FROM Staff WHERE Name ='Daniel Rough'

28
New cards

Select statement format in SQL

SELECT columns
	FROM TableName
	WHERE condition

29
New cards

Keywords SQL (6)

SELECT, FROM, WHERE, GROUP BY, ORDER BY, LIMIT

30
New cards

SELECT Aggregates in SQL

COUNT, SUM, AVG, MIN, MAX

31
New cards

What kind of join is this?

INNER

32
New cards

What kind of join is this?

FULL OUTER

33
New cards

What kind of join is this?

LEFT OUTER

34
New cards

What kind of join is this?

RIGHT OUTER

35
New cards

What is a view?

The dynamic result of one or more relational operations operating on the base relations to produce another relation

36
New cards

True/False views are read only

False (can be read only or updateable)

37
New cards

Why are views useful? (2)

To hide complexity and increase security

38
New cards

What does a horizontal view do?

Restricts the rows (records) of a table

39
New cards

What does a vertical view do?

Restricts the columns (attributes) of a table

40
New cards

Digression ????????

?????????

41
New cards

What CRUD for vertical view?

CRUD

42
New cards

What CRUD for horizontal view?

RU

43
New cards

What is a transaction?

A sequence of one or more SQL operations treated as a single, atomic logical unit of work

44
New cards

What are the two possible outcomes of a transaction?

Commit, rollback

45
New cards

What is integrity in databases?

Accuracy and reliability of the data

46
New cards

Domain Integrity ?

?

47
New cards

Entity Integrity ?

?

48
New cards

Referential Integrity?

?

49
New cards

User Defined Integrity ?

Rules ?

50
New cards

What does ACID stand for?

Atomicity, Consistency, Isolation, Durability

51
New cards

What is atomicity?

Either all the operations in a transaction are successful, or none of them are

52
New cards

What is consistency?

A transaction always leaves the database in a consistent state - no integrity constraints are violated and the new updated records are immediately available

53
New cards

What is isolation?

Transactions should execute as if there are no other concurrently running transactions

54
New cards

What is durability?

Once a transaction has committed, it is not lost due to any subsequent failure

55
New cards

What does LUW stand for?

a Logical/Least Unit of Work

56
New cards

What does LUW mean?

Either everything is completed or nothing is

57
New cards

slide 44/66 week4

58
New cards
59
New cards
60
New cards
61
New cards
62
New cards
63
New cards
64
New cards