DBMS Flashcards

1
Q

define data

A

information translated to required/appropriate format for easier management

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

define database

A

collection of organized data to manage and manipulate

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

define dbms

A

managing system for databases - create,update, manipulate and delete data entities

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

FPS | DBMS

A

Data inconsistency (common in FPS)
Data redundancy (common in FPS)
Security (Robust in DBMS)
Maintainibility
Data Concurrency
Accessibility (Difficult in FPS)

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

DBMS structure/architecture

A

1 DDL Compiler (converts query to table with metadata)
2 DML compiler and Query
Optimizer (converts DML to object code which is then optimized)
3 Data manager (optimized object code to machine unders., DBMS info access, buffer in main mem, controls backup and rec)
4 Data Files (data portion of dataB stored on magnetic tapes or optical disk)
5 Data Dictionary (respository of description, data, relationship, constraints, access)
6 Compiled DML (stored)
7 End User

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

Schema

A

Design of Database
Physical
Logical
View

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

Data Models

A

Analysis of relation between one data entity and another data entity
Relation (record base, record = tuples, fields = attributes)
Hierarchical (data organized into tree structure, records connected)
Network (extended hier, multiple records to same file, flexible)
E-R
OOP (extension of ER model)

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

What is view in DBMS and how to create it? Can you update view?

A

A view in DBMS (Database Management System) is a virtual table that is based on the result of a query. It provides a simplified way to present data from one or more tables, without actually storing the data itself.
Updation : only if from single table and no aggregate functions

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

What is trigger? Consider following schema
Student_fee_details (rollno, name, fee_deposited, date)
Write a trigger to preserve old values of student fee details before updating in the table.

A

A trigger is a set of actions that are automatically executed in response to certain events, such as insertions, updates, or deletions, on a table in a database.

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

Constraints

A

Primary Key
Foreign Key
Unique
Not null
Default
Check
Referential
Entity Integrity

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

Index

A

An index is a data structure that improves the speed of data retrieval operations on a database table (copy of selected col and pointer to corres rows)
adv : fast data retrieval, less disk i/o, better query performance
dis : additional memory, index maintenance, insert, updat and delete overhead

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

Types of triggers

A

Before Trigger: A before trigger is executed before the triggering event occurs. It can be used to validate data before it is inserted or updated.
After Trigger: An after trigger is executed after the triggering event occurs. It can be used to perform actions after data has been inserted, updated, or deleted.
Instead of Trigger: An instead of trigger is executed instead of the triggering event. It can be used to replace the default behavior of an insert, update, or delete operation.
Row-Level Trigger: A row-level trigger is executed for each row affected by the triggering event.
Statement-Level Trigger: A statement-level trigger is executed once for each triggering event, regardless of the number of rows affected.

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

Stored procedure

A

A stored procedure is a set of SQL statements that are compiled and stored in a database. It is a reusable block of code that can be executed repeatedly with different input parameters.

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