> Code Storage: transaction file

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 transaction file. Show all posts
Showing posts with label transaction file. 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)

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 ...