Section 1

Preview this deck

Database Normalization

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (16)

Section 1

(16 cards)

Database Normalization

Front

The process of organizing the fields and tables of a relational database to minimize redundancy and dependency.

Back

How do you drop a table?

Front

DROP TABLE statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table. DROP TABLE TABLE_NAME

Back

DQL

Front

(Data Query Language, contain Select) --- Used data retrieval. E.g. Select Name from Student where StudentID =111; Select * from Student;

Back

What is the 3nd (3rd Normal Form)?

Front

3NF It is in second normal form There is no transitive functional dependency (Where one table is dependent on the other)

Back

What is the 1NF (1st Normal Form)?

Front

1NF 1. Contains only atomic values (Values that can't be divided) 2. There are no repeating groups

Back

DCL

Front

Data control language is used to control access to data stored in a database. Grant, Revoke, Deny

Back

What are various DDL commands in SQL? Give brief description of their purposes.

Front

Data Definition Language: Defines data structure CREATE − it creates a new table, a view of a table, or other object in database. ALTER − it modifies an existing database object, such as a table. DROP − it deletes an entire table, a view of a table or other object in the database.

Back

What is the 2NF (2nd Normal Form)?

Front

2NF It is in first normal formAll non-key attributes are fully functional dependent on the primary key

Back

DML

Front

(Data Manipulation Language, contains Insert, Update, Delete) --- Used for data management. E.g. Insert into student (StudentID, Name, Class) Values (1,'Alex', 'Graduation'); Update table Student Set Name='Tom' where StudentID= 111; Delete from Student where StudentID = 111;

Back

What are various DML commands in SQL? Give brief description of their purposes

Front

Data Manipulation Language: Manipulate data SELECT − it retrieves certain records from one or more tables .INSERT − it creates a record. UPDATE − it modifies records. DELETE − it deletes records.

Back

INNER JOIN vs OUTER JOIN

Front

A join is used to compare and combine and return specific rows of data from two or more tables in a database. Inner Join An inner join focuses on the commonality between two tables. When using an inner join, there must be at least some matching data between two (or more) tables that are being compared. SELECT COLUMN1 FROM TABLE_NAME INNER JOIN TABLE_NAME ON TABLE_NAME1.COLUMN1 = TABLE_NAME2.COLUMN1 Outer Join An outer join returns a set of records (or rows) that include what an inner join would return but also includes other rows for which no corresponding match is found in the other tableLeft Outer Join (Left Join) Right Outer Join (Right Join) Fill Outer Join (Full Join)

Back

List each of the ACID properties that collectively guarantee that database transactions are processed reliably.

Front

ACID Atomicity Consistency Isolation Durability

Back

DDL

Front

(Data Definition Language, contains Create, Alter, Drop) --- Used for Table creation. E.g. create table student (StudentID Int, Name Varchar (50), Class Varchar (20);

Back

What is ACID durability?

Front

Durability. Durability means that once a transaction has been committed, you will not be able to do a rollback, In a relational database, for instance, once a group of SQL statements execute, the results need to be stored permanently (even if the database crashes immediately thereafter). To defend against power loss, transactions (or their effects) must be recorded in a non-volatile memory.

Back

What is RDBMS?

Front

Relational Database Management System

Back

What are the various constraints in SQL?

Front

NOT NULLIndicates that a column cannot store NULL value UNIQUEEnsures that each row for a column must have a unique value PRIMARY KEYA combination of a NOT NULL and UNIQUE. Ensures that a column or columns have a unique identity which helps to find a particular record in a table more easily and quickly FOREIGN KEYEnsure the referential integrity of the data in one table to match values in another table CHECKEnsures that the value in a column meets a specific condition DEFAULTSpecifies a default value for a column

Back