Week 3 Content Dbad6020
Week 3 Content Dbad6020
1: Planning a User
Database
LO1:Explain the role of the configuration options for creating a database;
LO2:Evaluate the steps and considerations involved in planning a user database;
LO3:Discuss the tools and approaches to create a database with SQL Server;
LO4:Describe the role and uses of the main types of physical files in a SQL server
database;
LO5:Explain the different terminologies and settings of data files and log files;
LO6:Contrast two types of authentication for connecting to the database server using
examples;
LO7:Discuss the different objects in the SQL server security model;
LO8:Apply the principles of using:
o The system and user-defined data types in a given scenario;
o The object name conventions in a SQL database environment;
LO9:Explain how a SQL database is created using an example and appropriate tools
LO1:Explain the role of the configuration
options for creating a database
There are two main types of physical files:data files and log files
A SQL Server database must have at least one of each file type.
Data files store the data that is organized in tables and indexes as well as the schemas to the various
objects that represent the logical structure of the database. A schema is a logical container that groups
together collections of objects within a database and allows them to be managed as a group. Data files
are placed into filegroups for storage management. Each databasemust have a primary filegroup with
at least one data file.
However, a database may have more than one data file in a filegroup; the database is able to use all
the data files concurrently, which can improve performance. If using more than one data file within a
filegroup, the data files should all be the same size as the database attempts to fill them equally.
Secondary user-defined filegroups can be created for a specific purpose, for example to store the data
from a specific object or database partition to improve I/O performance, a term used to describe the
number of read and write operations that can be processed by the physical disk in a given time frame.
To properly configure multiple data files and filegroups for best performance, you must know how the
physical drive is configured.
database transaction
Log files record the database transaction activity. A database transaction is a logical unit of work
reading or writing from a database. Database transactions are important for maintaining the integrity
and consistency of the database.
A database transaction is designed to rollback should the transaction fail. The rollback capability
relies on writing the transaction to the log file prior to committing the transaction to the data file.
The log of database transactions is also necessary when recovering a database from a backup—
which is done by replaying the transaction activity from the log to ensure no loss of data. It is possible
to have more than one