Terms Flashcards
(34 cards)
Full Functional Dependency
A functional dependency X -> Y is a full functional dependency if removal of any attribute type A from X means that the dependency does not hold anymore.
Prime Attribute
Add Prime
Elementary Prime Attribute
Add El Prime
Multi-valued Dependency
If each X value in X->->Y exactly determines a set of Y values, independently of the other attribute types.
Join Dependency
Add Join
Partial Functional Dependency
A functional dependency X -> Y is a partial dependency if an attribute type A from X can be removed from X and the dependency still holds.
Transitive Dependency
A functional dependency where there is a set of attribute types Z that is neither a candidate key nor a subset of any key of R, and both X->Z and Z->Y hold.
Trivial Functional Dependency
A functional dependency X->Y, where Y is a subset of X
What is SQL
A standard language which stands for Structured Query Language
What does SQL do
SQL is the core of the relational database which is used for accessing and managing a database
What is MySQL
A database management system
DDL
Data Definition Language - A subset of SQL that allows you to perform various operations on the database such as CREATE, ALTER, and DELETE objects.
DML
Data Manipulation Language - A subset of SQL that allows you to access and manipulate data. It helps you to insert, update, delete and retrieve data from the database.
DCL
Data Control Language - A subset of SQL that allows you to control access to the database. Example – Grant, Revoke access permissions.
DBMS
Database Management System - a software application that interacts with the user, applications, and the database itself to capture and analyze data.
A DBMS allows a user to interact with the database. The data stored in the database can be modified, retrieved and deleted and can be of any type like strings, numbers, images, etc.
Database
A structured collection of data
Types of DBMS
- Relational
2. Non-relational
Relational DBMS
The data is stored in relations (tables). Example – MySQL.
Non-relational DBMS
There is no concept of relations, tuples and attributes. Example – MongoDB
What is a table?
A table refers to a collection of data in an organised manner in form of rows and columns.
What is a field?
Refers to the number of columns in a table.
Char vs Varchar
Char is fixed length ex char(10).
Varchar is variable length ex varchar(10) can store 2, 4, 5, 8 etc.
What are constraints
Constraints in SQL are used to specify the limit on the data type of the table. It can be specified while creating or altering the table statement. The sample of constraints are:
NOT NULL CHECK DEFAULT UNIQUE PRIMARY KEY FOREIGN KEY
Data Integrity
defines the accuracy as well as the consistency of the data stored in a database.
It also defines integrity constraints to enforce business rules on the data when it is entered into an application or a database.