Posts

Showing posts from July, 2018

Example of Lossy Decomposition

Suppose you were using the following relation R = (SSN, Name, Address):            R SSN     Name      Address 1111    Joe       1 Pine 2222    Alice     2 Oak 3333    Alice     3 Pine  Let R1 = (SSN, Name) and R2 = (Name, Address).      R1                                                          R2 SSN     Name                              |     Name    Address 1111    Joe                                   |     Joe     1 Pine 2222    Alice                               |     Alice   2 Oak 3333    Alice                               |     Alice   3 Pine The join of R1 and R2 would produce the following table:        R1 join R2 SSN     Name      Address 1111    Joe       1 Pine 2222    Alice     2 Oak 2222    Alice     3 Pine 3333    Alice     2 Oak 3333    Alice     3 Pine

DDL DML DCL and TCL

DML (Data Manipulation Language) 2.  DDL (Data Definition Language) 3.  DCL (Data Control Language) 4.  TCL (Transaction Control Language)   DML (Data Manipulation Language) DML statements affect records in a table. These are basic operations we perform on data such as selecting a few records from a table, inserting new records, deleting unnecessary records, and updating/modifying existing records. DML statements include the following: SELECT  – select records from a table INSERT  – insert new records UPDATE  – update/Modify existing records DELETE  – delete existing records DDL (Data Definition Language) DDL statements are used to alter/modify a database or table structure and schema. These statements handle the design and storage of database objects. CREATE  – create a new Table, database, schema ALTER  – alter existing table, column description DROP  – delete existing objects from database DCL (Data