CSC425

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

1/22

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:28 AM on 5/6/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

23 Terms

1
New cards

1NF

Atomic values (no multivalued columns), unique rows

2
New cards

2NF

No partial dependencies (non-PK columns fully dependent on the entire PK)

3
New cards

3NF

No transitive dependencies (non-PK columns don’t depend on other non-PK columns)and all non-PK columns are only dependent on the primary key.

4
New cards

4NF

No multivalued dependencies (move to new table and reference with key)and no partial dependencies between non-key attributes.

5
New cards

5NF/BCNF

Eliminate join dependencies, ensure all dependencies are candidate key based

6
New cards

Input Stored Procedures

Accepts parameters to insert/update data

7
New cards

Output Stored Procedures

Uses output variables to return data

8
New cards

Triggers

  • Event-drive procedures fired after or before DML operations (INSERT, UPDATE, DELETE)

    • Used to enforce rules or automate changes

      CREATE TRIGGER ON table_name

      AFTER INSERT ON table_name

      FOR EACH ROW

      BEGIN

      — logic

      END;


9
New cards

Cursors

  • Process rows one at a time

  • Steps: Declare, Open, Fetch, Close, Deallocate

    • Useful in complex logic/aggregation


10
New cards

Case

  • Used for conditional logic

    SELECT CASE WHEN condition THEN result ELSE default END


11
New cards

Replication

  • The process of copying and maintaining database objects in multiple databases. It ensures data consistency and reliability across different locations.

  • Can replicate specific table


12
New cards

Types of Replication

Snapshot, Peer-to-Peer, Transactional, Merge

13
New cards

Transactional uses distributor as repository

True

14
New cards

Transactional replication uses snapshot agents

True

15
New cards

SQLite Features

Supports: Triggers, COUNT and other aggregates, works on small devices

It is NOT Firebase

16
New cards

MongoDB Basics

  • Table → Collection, Row → Document, PK → id_ (ObjectID)

  • Commands:

    • db.posts.update({ }, {$set, $inc, $rename})

    • db.posts.remove({ })

    • db.posts.find({ })

      • $elemMatch, $search, createIndex({ title: ‘text’})


17
New cards

SQL Injection

  • Valid: ‘OR 1=1 ;—

  • Invalid: OR 1=1; —


18
New cards

Row-Level Security

  • I can’t see my colleagues salary? (Correct)

  • Manager can’t see, SSN hidden, I can’t see my own salary (Incorrect)


19
New cards

Roles and Permissions

  • Uses scripts to add users, roles, and assign permissions

  • Know syntax code examples for creating and managing roles in a database context, including granting and revoking access to various resources.In a database context, roles and permissions define the access levels and actions users can perform, ensuring data security and proper authorization protocols. Scripts are often used to automate the management of these roles.


20
New cards

Sharding

Splits DB horizontally (not normalization) to distribute data across multiple servers or instances, improving performance and scalability.

21
New cards

Miscellaneous

  • MongoDB handles unstructured data

    • SQL server can use key-value for unstructured data


22
New cards

Normalization Example

  • A123400 → multiple phone number

    Split into separate rows per phone number


23
New cards

Student Registration Table

Composite Key: StudentID, CourseID, SemID, Year, ProfID

  • Analyze Functional dependencies