collaboratory notes for DBMS

2/22

A database is an organized collection of data, generally stored and accessed electronically from a computer system

A database is commonly using a table methode to store the data

There are two type of Database one is Structured DB and the other one is UnStructured DB

DB is the shortest name of Database

A Database Management System is software designed to store, retrieve, define, and manage data in a database.

The most common operation happening inside the DBMS is Create Read Update and Delete or CRUD in short

VCF or Vritual Card File is a default extention for contact file exported by Android OS, VCF Contains plain text that describe how the contact is saved on-to ur Android phone

column/attribute/field
row/record/tuple

An expression is composed of operators and operands. Precedence and associativity of operators:

(=); ( ** ) are right associative operators

Code obfuscation

Lexical scoping

Function definition
Function invocation


PRAGMA table_info(table_name);


space -next page
b - back one page
/ - search
g - beginning
G - end
q - quit
j - down
K - up
i -ignore/ pay attention to case

CTRL + A + K - to erase the sentence
ESC + F -
ESC + D -
.help
.tables
.databases

CTRL+A, CTRL+E are readline library
regular expression : \b is boundary between alphanumerical characters such as [a-zA-Z0-9_] and non-alphanumerical characters such as punctuations and space.

  1. barrier of exit
  2. (vendor lock-in)
  3. import
  4. export

Key words:

  1. specification
  2. vendor lock-in
  3. proprietory file format
  4. open file format
  5. reverse engineering
  6. Embrace, Extend and Extinguish
  7. output redirection

Proprietary File Format, File Format Specification, Reverse Engineering, Vendor Lock-In, Barrier of Exit



3/22 keywords

Proprietary File Format - doc,xls,ppt
Open file format - HTML, png,svg, csv (comma separated values)
File format specification

**reverse engineering **


Embrace - adopting, embracing or implementing public standard
Extend - make the standard stronger or more powerful by addition and promotion of features not supported by the competing product
Extinguish - abandon or extinguish other standard where they marginalize competitors that do not or cannot support the new extensions

Entity Relation Model(for example: dbeaver relationship)

database transaction

several statements that put together that all will happen or nothing will happen.

ACID-Atomic, Consistent, Isolation, Durable

Begin Transaction - is like left brace
Commit - is like Right brace

Data Definition Language
Data Manipulation Language
Data Query Language
Data Control Language
Transaction Control Language


4/12 key words

cardinality
ER diagram - entity relationship diagram
attribute


|A| * |B| (here * is integer multiplicaton)
|A * B| (* is cartesian product)

-domain(character: char, ascii_code: integer)
-relation scheme(parent: string, child: string)

relation instance - an instance of that scheme

keys: - superkey(combination of all columns)
- candidate key (a superkey which has no proper subset that is also a superkey, smallest number of column that can identify the specific row)
- primary key (one particular candidate key chosen by the designer to serve as the basis for identifying tuples.)
- foreign key (table's column or group of columns is another table's primary key)

composite - two or more attribute
- stored in "object"

Crow's foot:
(Entities - connected by lines
Symbols at either end of the line - the cardinality of the relationship between the entities)

Atomic and Composite attributes
Null attribute

Relational model requires that attributes be atomic and single-valued.

Multivalued attribute can have more than one value at a time for an attribute

Derived attribute one which can be computed from other attribute(s), e.g. zodiac sign can be derived from date of birth

Domain, Null, keys

Constraint(attribute's)
Composite key - a key composed of two or more fields

index

Domain constraints
Entity integrity constraints : primary key value can't be null.
Referential Integrity Constraints
Key constraints

in a many-to-one relationship, you have a foreign key in the many side, referencing the primary key from the parent table

many to many relationship is most likely to be an independent table and put the key in the smaller values

Select a repo