Sunday 4 February 2018

SQL Training - 01

Schema: is a description of the data 
schema is SQL is a group of tables 
you can create a user and give him a schema; this user can't see any other tables from sachems

SQL Server Databases:
  1. Master: contains meta of all dbs 
  2. Temp:
  3. Model: Like polymorphism (Create tables (Like Lookups), views, stored procedures,... to be inherited in and newly created database)
  4. Ms: It contains Jobs, Alerts,
  5. Resource
  6. Distribution 
You mustn't make any changes in Master and MS databases


Default Collations for Arabic:

Use Arabic_100_CI/CS_AS_KS_WS after that you don't need to use nvarchar as datatypes you can use varchar to store arabic values 

* You can create multi-files(.nDF) to store tables, each table could be stored in different group, for example create A1.nDF, A2.nDF files as group, and put table T1 in group 1
* Not recommend to use Shrink in database but still you can use it. 

Views:
  • Lite
  • Executed
  • Ready to read
  • High performance and low time to execute
  • Separated Privileges
  • Denormalization 
  •  No parsing needed after created

No comments:

Post a Comment