Core of Relational
Database used to Access and Manage Data.
Data Mart > Data Warehouse > Data Base > Table
Row | Record
Column | Field
Page : Basic Unit of Database File (I/O)
NULL
: Unavailable | Unknown | Unassigned | NA
Zero
| 0 : Number
blank space (' ' | " ") : Character
Metadata
: Attributes about Data | Data that Describes Information about other Data (Memory Usage, Address, etc)
Current Date
: GetDate() Date + Timestamp
- Determine the most Efficient way to Execute a given Query by considering every Query Plan.
- Large number of Queries can be Executed in Less Time.
- Reduce
Time
andSpace
Complexity.
- Structured Database | Data is stored in Relations (Tables)
- Data in the form of Dictionary (Key Value Pairs) | MongoDB
- Data Repository (Tables | Procedures | Functions | Views) related to Organization and Business or Personal Database.
- PostgreSQL is Free Open Source | Developed by Community of Developers
- A : Atomicity | All or Nothing
- C : Consistency | Gurantees Committed Transaction State | Data Meet All Validation Rules.
- I : Isolation | Transparent and Independent | Concurrency.
- D : Durability | Commited Data is Never Lost.
- Accuracy as well as the Consistency of Data stored in DB
- Two or more Computing Process Executing at the Same Time.
- The Means of Communication between a
Client
and aServer
.
- A State in which Resource is Occupied by Two or More Process
- Process is Requesting for Resource which is already occupied by some other Process.
- Logical Representation of One or More
Tables
.
- Data Types which are Specificially Optimized for Storage of Geographic Coordinate based Data.
- An Indexing Method provided for Fast Retrieval.
- An Operation in which Rows of 1 Table are related to Rows of another through Common Column Value.
- Return only Common | Matching Rows
- Return All Rows from Left Table and Matching from Right Table
- Return All Rows from Right Table and Matching from Left Table
- Returns all the Records from Left and Right
- Join formed between two Tables with Same Column Name and Same Data Type.
- Cross Product | Cartesian Product of Two Tables
- An SQL Stored Procedure that contains 1 or more INSERT | UPDATE and DELETE Statements.
- Programming Paradigm that relies on Concept of Class and Objects Stucture a S/W Program into Simple Reusable Blueprints used to Create Individual Instance of Class.
- Set of SQL Statements with an Assigned Name, stored in RDBMS as a Group, that can be Reused by Multiple Programs.
Both are Character Data Type Char : Fixed Length Varchar : Variable Length
- A Column (Collection) that Uniquely Identifies Each Row in Table.
- Uniquely Identifies a Single Row in the Table
- Null Values are not Allowed
Primary Key | Foreign Key |
---|---|
Unique Key in the Table |
Primary Key of another Table |
Table can contain only One Primary Key |
Table can contain more than one Foreign Key |
Primary Key cannot contain Duplicate Value |
Foreign Key can contain Duplicate Value |
- Specify Limitation on Data Types of the Table
NOT NULL
: Column should not Accept Null ValueCHECK
: Integrity (Limit the Value Range that can be Placed in Column) e.g. Salary should be between 2L to 4LDEFAULT
: Default Value for a ColumnUNIQUE
: Each and Every Value in the Column is Unique.PRIMARY
KEY : Uniquely Identify Each Row | No NULL AllowedFOREIGN
KEY : Link Two Tables Together | Identify Relationship between Tables by Referencing Columns.
Delete | Truncate |
---|---|
Delete a Row in a Table | Delete All the Rows from a Table |
Rollback Data | Cannot Rollback Data |
DML (Manipulation) Command |
DDL (Definition) Command |
Slow | Fast |
- Way of Organizing Data in the Database.
- Divide
Large
Tables intoSmall
Tables and Link them using Relationships. - Avoid Duplication.
- More Table with Less Rows.
- Efficient Data Access.
- Quick Search | Easy Modification.
- Compact Database.
- Add Redundant Data to one or more Tables.
- A Person, Place or thing in the Real World about which Data is Stored in Database.
- Relation or Links between Entities that have something to do with each other.
- Index Refers to a Record or
Row
for Retrieval of Data.
- Each and Every Index Value is Unique (AUTONUM)
- Special Type of Stored Procedure
- Defined to Execute Automatically after Data Modification
- Allows to Execute Batch of Process (Insert | Update | Delete Queries)
- A Query inside another Query defined to Retrieve Data.
- Outer Query is the Main Query and Inner Query is Sub Query.
- Sub Query is Executed before Main Query.
- Can be Nested inside a SELECT | UPDATE or any other Query.
- Can also use any Comparison Operators.
- Select the Data from a Table Referenced in the outer Query | Dependent on Column of Other Tabl
- Independent Query | Output of Sub Query is Substituted in the Main Query.
- Evaluate Mathematical Calculation and Return Single Value.
- Work on the Set of Rows and Result one Result Per Group. (AVG | COUNT | MAX | MIN | SUM | VARIANCE)
- Single Value based on Input e.g. NOW()
Between
: Range e.g BETWEEN 5 AND 10In
: Check for Specific Values Provided e.g. Value IN (5,6,7,8,9,10)
- Perform Some Calculations on the Data.
- Modify Individual Data Items.
- Manipulate Output.
- Format Dates and Numbers.
- Convert Data Types.
Allows Conditional Update or Insertion of Data into a Table
- Performs
Update
: If Rows Exists. - Performs
Insert
: If the Row does not Exist.
- Limit the Result
- Provide Condition to Query
- Filter the Rows
- Limitations applied on
Column
.
- Limitations applied on Entire
Table
.
Like
(%) : Match Zero
or More
Characters.
Underscore
(_) : Match Exactly
One Characters.
Virtual
Table |Subset
of Data | Data ofOne
orMore
Table combined on Relationship.Restrict
Access to Orignal Data Table.- Make Simple Query | Focus on Required Data.
- Set of Rules that Determines How to
Store
andCompare
Data.
- Variable can be Accessed | Used | Exist only inside particular Function.
- Variable can be Accessed throughout the Program.
-
Stuff
:Overwrite
existing character or part of character |Add
orInsert
string to existing string. -
Replace
:Replace
the existing character and all its Occurence.