> Code Storage: database

Code Storage

A Technical blog for those who want to gain knowledge about SQL,MySQL,Data Science and real time query

Responsive Ads Here

Advertisement

Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Thursday, January 9, 2020

Database fundamental.what is database and table and record.

Database,table,record,SQL,fundamental
                                                      1. Database fundamental,table,record


DataBase Fundamental


  • Database server instance contains multiple database.
  • Database contain multiples tables.
  • Data have two important form:
                  1. File form
                  2. Table form 

1. File Form      

  • SQL server database have three types of file:
                        a.Primary File
                        b.Secondary File
                        c. Transaction Log  

a.Primary File:-       

  • The primary data file contains the startup information for the database and point to the others file in database.
  • User data and object can be stored in this file or secondary data file.
  • Every database has one primary data file.
  • The recommended file name extension for primary data file is ".mdf ".         

b.Secondary File:-      

  • Secondary data files are optional,are user defined and store user data.
  • Secondary files can be  used  to spread data across multiple disk by putting each file on a different disk drive.
  • If a database exceeds the maximum size for a single windows file you can use secondary data files so the database can continue grow.
  • The recommended file name extension for secondary data files is ".ndf".

c.Transaction Log:-

  • The  transaction log files hold the log information that is used to recover the database.
  • There must be at least one log file for each database.
  • The recommended file name extension for transaction log is ".ldf".

2.Table Form

  • SQL table is a collection of data which is organized in terms of rows and columns.
  • In DBMS,the table as known as relation and row as a tuples.
  • Table is a simple form of  data storage.A table  is also convenient representation of relation.
  • Tables contains multiple records (Rows and Columns ).

What is Database

  • A database is a systematic collection of data .
  • Database support storage and manipulation of data.
  • Database make data management easy.

Table And Record

  • A table in a relational database is a predefined format of rows and column that define an entity.
  • Each column contains a different type of attribute and each row corresponds to a single record.
  • Each table is provided with a name.
Example:-
                    SID              Name          Address             Contact
                   1001              Shiva            Delhi                  123456
                   1002              Ram            Mumbai               987658
                   1003               Sri               Pune                   435675  --------> Record(Row)

Monday, January 6, 2020

What is SQL.Purpose of SQL.Who should learn

SQL,Purpose,Learn,DBMS,RDBMS
                                                1. What is SQL and Purpose of SQL

Introduction of SQL
  • SQL stands for structured query language. SQL was initially developed at IBM is 1970s.  
  • SQL is the the standard language to communicate with relational database management system  like oracle,MS access,MS SQL server, Mysql,Db2,Sybase etc.SQL is a command based        language.
  •  SQL is domain specific not general purpose,used in design and management of data held in       RDBMS ( Relational database management system).
  •  SQL is a command based language.
  •  SQL lets you access and manipulate databases.
  •  SQL became a standard of the american national standard institute (ANSI) in 1986,and of the    international organization for standardization(ISO) in 1987.
Purpose of SQL 
  • SQL is used to create new database.
  • SQL is used to create new tables in a database.
  • SQL is used to insert records, update records,delete record in a database.
  • SQL is used to retrieve data from database.
  • SQL can set permission on tables procedures and views.
  • SQL is used to create stored procedures in a database.
  • SQL is used to create view in a database.
Who should learn SQL


  • Database Developers.
  • Database Admistrators.(DBA)
  • Database Testers.
Database Developers:
                                      Design and deploy database table structures,forms,reports,and queries.
Database Admistrators:
                                      Keeping database upto data and  managing database access.writing reports documentation and operating manulas.
Database Testers:
  1. Verify data Integrity ( completeness and correctness of data).
  2. Verify data Manipulation (Add,Update,Delete).
  3. Verify data Comparison (two database front end data with back end data).
                             

SEVER TYPE IN SSMS ( Sql Server Managment studio)

When you install the SQL Server management studio and then you want to connect with the SQL Server then there are four types of SQL servers ...