Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts
Tuesday 17 April 2018
DESC Command
Irawen April 17, 2018 SQL No comments
Create Table
Irawen April 17, 2018 SQL No comments
Syntax :-
CREATE TABLE table name
(
Column_name1 data-type (size),
Column_name2 data-type (size),
Column_name3 data-type (size)
);
Ex :-
CREATE TABLE my_tab
(
name varchar (30),
roll int (4),
address varchar (100)
);
Another way to create a table
Syntax :-
CREATE TABLE table name
(
Column_name1 data-type (size) [constraints],
Column_name2 data-type (size) [constraints],
Column_name3 data-type (size) [constraints]
);
Ex :-
CREATE TABLE my_tab
(
name varchar (30) NOT NULL,
roll int (4) PRIMARY KEY,
address varchar (100)
);
Guidelines for creation of Table
1. Table name should start with an alphabet.
2. In table name, blank spaces and single quotes are not allowed.
3. Reserve words of that RDBMS/DBMS cannot be used as table name.
4. Proper data type and size should be specified.
5. Unique column name should be specified.
CREATE TABLE table name
(
Column_name1 data-type (size),
Column_name2 data-type (size),
Column_name3 data-type (size)
);
Ex :-
CREATE TABLE my_tab
(
name varchar (30),
roll int (4),
address varchar (100)
);
Another way to create a table
Syntax :-
CREATE TABLE table name
(
Column_name1 data-type (size) [constraints],
Column_name2 data-type (size) [constraints],
Column_name3 data-type (size) [constraints]
);
Ex :-
CREATE TABLE my_tab
(
name varchar (30) NOT NULL,
roll int (4) PRIMARY KEY,
address varchar (100)
);
Guidelines for creation of Table
1. Table name should start with an alphabet.
2. In table name, blank spaces and single quotes are not allowed.
3. Reserve words of that RDBMS/DBMS cannot be used as table name.
4. Proper data type and size should be specified.
5. Unique column name should be specified.
Sunday 15 April 2018
Create Database
Irawen April 15, 2018 SQL No comments
It is used to create database.
Syntax:- CREATE DATABASE database_name;
Ex:- CREATE DATABASE my_db;
Guide for creation of database:-
Name should start with an alphabet
Blank space and single quotes are not allowed
Reserve words of that RDBMS/DBMS can not be used as database name
Use a database
This is used to tell your RDBMS/DBMS that you want to use this database.
Syntax:- USE database_name;
Ex:- USE my_db;
Syntax:- CREATE DATABASE database_name;
Ex:- CREATE DATABASE my_db;
Guide for creation of database:-
Name should start with an alphabet
Blank space and single quotes are not allowed
Reserve words of that RDBMS/DBMS can not be used as database name
Use a database
This is used to tell your RDBMS/DBMS that you want to use this database.
Syntax:- USE database_name;
Ex:- USE my_db;
Wednesday 21 March 2018
What is database?
Irawen March 21, 2018 SQL No comments
A database is integrated collection of related information along with the details so that it is available to the several user for the different application.
This is a database
Table/Entity
Table is the structure inside database that contains data organized in columns and rows.
Column/Field/Feature/Attributes
The name of each column in a table is used to interpret its meaning and is called an attributes.
Row/Records/Tuple
Each row in a table represents a record and is called tuple.
Example:-
Rahul , 101 , Delhi , rahul@gmail.com
Sona , 102 , Kolkata , sona@gmail.com
Sumit , 103 , sumit@gmail.com , Ranchi
Sam , sam@gmail.com , Noida , 104
This is a database list of four person, now its create in table form
Database Management System (DBMS)
DBMS is the software system that allows the access to the data in the database.
Relational Database Management System (RDBMS)
RDBMS avoided the navigation model as in old DBMS and introduced Relational model. The relational model has relationship between tables using primary keys, foreign keys and indexes. thus the fetching and storing of data become faster than the old Navigation model.RDBMS is useful to efficiently manage vast amount of data and is used in large business application.
Ex:- SQL Server , Oracle , MySQL , MariaDB , SQLite.
Structural Query Language (SQL)
It is commonly used with all relational database for data definition and manipulation.
Feature of SQL :-
It is a non procedural language.
It is an English-like language.
It can process a single record as well as set of records at a time.
All SQL statement define what is to be done rather than how it is to be done.
SQL has facilities for defining database views , security , transaction etc.
This is a database
Table/Entity
Table is the structure inside database that contains data organized in columns and rows.
Column/Field/Feature/Attributes
The name of each column in a table is used to interpret its meaning and is called an attributes.
Row/Records/Tuple
Each row in a table represents a record and is called tuple.
Example:-
Rahul , 101 , Delhi , rahul@gmail.com
Sona , 102 , Kolkata , sona@gmail.com
Sumit , 103 , sumit@gmail.com , Ranchi
Sam , sam@gmail.com , Noida , 104
This is a database list of four person, now its create in table form
Database Management System (DBMS)
DBMS is the software system that allows the access to the data in the database.
Relational Database Management System (RDBMS)
RDBMS avoided the navigation model as in old DBMS and introduced Relational model. The relational model has relationship between tables using primary keys, foreign keys and indexes. thus the fetching and storing of data become faster than the old Navigation model.RDBMS is useful to efficiently manage vast amount of data and is used in large business application.
Ex:- SQL Server , Oracle , MySQL , MariaDB , SQLite.
Structural Query Language (SQL)
It is commonly used with all relational database for data definition and manipulation.
Feature of SQL :-
It is a non procedural language.
It is an English-like language.
It can process a single record as well as set of records at a time.
All SQL statement define what is to be done rather than how it is to be done.
SQL has facilities for defining database views , security , transaction etc.
Popular Posts
-
This textbook grew out of notes for the ECE143 Programming for Data Analysis class that the author has been teaching at University of Cali...
-
What you'll learn Gain an immersive understanding of the practices and processes used by a junior or associate data analyst in their d...
-
Code: import pyfiglet from termcolor import colored import random def get_random_font_style(): # List of available Figlet font styles ...
-
Machine learning is one of the fastest growing areas of computer science, with far-reaching applications. The aim of this textbook is to i...
-
import statsmodels.api as sm import numpy as np # Generate some sample data x = np.random.rand(100) y = 2 * x + np.random.randn(100) # Fit...
-
1. What is the output of following Python code? a = 'a' print(int(a, 16)) Solution and Explanation: Let's break down the expr...
-
Code: x = [1, 2, 3, 4, 5] a, *_, b = x print(a, b) Solution and Explanation: Let's break down the Python code step by step: x = [1, 2,...
-
Code: num = [1, 2, 3] *middle, last = num print(middle, last) Solution and Explanation: Let's break down the code step by step: num = ...
-
Code: num = [7, 8, 9] *mid, last = num[:-1] print(mid, last) Solution and Explanation: let's break down the code: num = [7, 8, 9] *m...
-
Code: import gzip import shutil def compress_file(input_file, output_file): with open(input_file, 'rb') as f_in: with ...
Categories
AI
(27)
Android
(24)
AngularJS
(1)
Assembly Language
(2)
aws
(17)
Azure
(7)
BI
(10)
book
(4)
Books
(117)
C
(77)
C#
(12)
C++
(82)
Course
(62)
Coursera
(179)
coursewra
(1)
Cybersecurity
(22)
data management
(11)
Data Science
(95)
Data Strucures
(6)
Deep Learning
(9)
Django
(6)
Downloads
(3)
edx
(2)
Engineering
(14)
Excel
(13)
Factorial
(1)
Finance
(6)
flutter
(1)
FPL
(17)
Google
(19)
Hadoop
(3)
HTML&CSS
(46)
IBM
(25)
IoT
(1)
IS
(25)
Java
(92)
Leet Code
(4)
Machine Learning
(44)
Meta
(18)
MICHIGAN
(5)
microsoft
(3)
Pandas
(3)
PHP
(20)
Projects
(29)
Python
(753)
Python Coding Challenge
(226)
Questions
(2)
R
(70)
React
(6)
Scripting
(1)
security
(3)
Selenium Webdriver
(2)
Software
(17)
SQL
(40)
UX Research
(1)
web application
(8)