This document compares Microsoft Access and SQL Server databases. It discusses their differences in terms of scalability, maintenance procedures, and limitations on the number of simultaneous users. Microsoft Access is best for small offices and businesses with a limited number of users, while SQL Server can support large enterprises with many simultaneous users. The document also provides SQL scripts to create sample tables, insert data, and establish relationships in a student scheduling database to demonstrate uses of the different databases.
2. PHASE 3 IP 2
Phase 3 Ip
There are major relational database platforms available at the moment: Microsoft
Access and SQL Server. MS Access belongs to the desktop, file-based programs’ type, while
SQL Server is based on the client/server architecture. They have differences and similarities
and should be used according to the particular situation to get maximum result. On the
example of MS Access 2000 and SQL Server 2000, these platforms are to be compared and
contrasted.
SQL Server is a more robust system for database management since it was designed
to have hundreds and thousands of connections simultaneously. MS Access can handle only
relatively small number of users at any point of time. In addition, maintenance procedure
requires locking out all the users in case of MS Access. SQL Server does not have such
limitation and has lots of maintenance tools.
Therefore, both products have advantages and disadvantages. Microsoft Access has
the following advantages: it can be easily deployed (it is necessary to just copy the file out to
the network and notify people what the path to it is); prototyping is rapid due to the excellent
UI development tools for database type applications; it is generally cheaper to deploy in most
cases and for small installations especially. The disadvantages are as follows: as it has
already been mentioned, maintenance of MS Access database is rather difficult in terms of
providing users with access to it at this moment (it is needed to lock the database and
disconnect all users that increases the downtime of such database); such state of things can
lead to the data corruption if a substantial number of users are connected; MS Access does
not support the same number of connections as SQL Server does.
MS SQL Server has the following advantages and disadvantages. The advantages can
be described as follows: it has not issues with maintenance because there are lots of tools for
maintenance available and most of the procedures can be performed with users in DB (it
3. PHASE 3 IP 3
leads to the higher uptime); SQL Server can support substantially larger number of users and
can be used in the project of enterprise or other similar scale. Among the disadvantages, the
following ones can be outlined: it is rather expensive; it is far more complex than competitor;
there is no built-in UI development tools; SQL Server will require additional development
platform to provide the opportunity to build a front-end and assure proper reporting
procedures.
Considering the above-said, the following area of application for both products can be
mentioned. MS Access is to be used in offices and small-scaled enterprises, the places where
relatively small database and considerable number of users is present. It should be added that
downtime should not be critical in case of MS Access. SQL Server should be used for
database driven websites, large-scale enterprises, and other purposes involving substantial
amounts of simultaneous connections and users.
The following DDL scripts are used to show how the tables and relationships between
them were created:
CREATE DATABASE Students_Scheduler
CREATE TABLE students (
id INTEGER
studentid INTEGER PRIMARY KEY,
firstname VARCHAR(50)
lastname VARCHAR(75)
birthdate DATE
gender VARCHAR(6)
startdate DATE
GPA INTEGER(4.00)
isactive INTEGER(500)
bio VARCHAR(3000)
advisorid INTEGER
);
CREATE TABLE advisors (
4. PHASE 3 IP 4
id INTEGER
advisorid INTEGER PRIMARY KEY,
firstname VARCHAR(50)
lastname VARCHAR(75)
emailaddr VARCHAR(100)
);
CREATE TABLE classes (
id INTEGER
classid INTEGER PRIMARY KEY,
classcode VARCHAR
classname VARCHAR
description DATE
);
CREATE TABLE students_classes (
id INTEGER
studentclassid INTEGER PRIMARY KEY,
classid INTEGER
startdate DATE
assignment1 INTEGER
assignment2 INTEGER
assignment3 INTEGER
assignment4 INTEGER
classgpa INTEGER
);
SQL Server security is an important issue in many terms such as secureness of the
databases and data stored in them, access levels to the databases, access levels and
permissions to the server itself. Therefore, there is a certain model of security that most of the
SQL servers employ to guarantee data security. The security model consists of such parts:
login security, database security, and database objects. Thus, login security is responsible for
connecting to the server; database security is on guard of database access; and database
5. PHASE 3 IP 5
objects role is about getting access to the objects and data stored in the individual databases
(Harkins, 2004; Larsen, 2007).
Login security has different layers: Windows and SQL Server authentication, SQL
Server login, and association of permissions to login. Database security deals with database
access, database level roles, and database schema level permissions (Harkins, 2004; Larsen,
2007). Objects layer deals with object level accesses. According to this model, a user that
needs to connect to the SQL server, will have to pass Windows or SQL Server authentication
(the choice depends on administrators of the server). Thus, if SQL Server login was chosen, a
user would need to have appropriate login and password maintained by SQL Server. After the
login procedure, a user can have access to the SQL Server only but not to databases or
database objects within SQL Server.
Then, permissions need to be granted at different levels such as “Server Level,
Database Level, Schema Level, Database Role level, Application Role level or object level”
(Larsen, 2007). On the database level, a user needs to obtain the unique login and password
and only then the access to the database will be granted. However, the access to the database
objects will be provided only if the appropriate rights are inherit to the user or granted by
administrator.
In order to grant access to the users, it is necessary to use database schema level
permissions. “SELECT” statement can be used to add users to the list of privileged users. As
it can be notices, there are different objects and layers to administrate to get access to some
table with the appropriate rights. It guarantees multilayered protection of SQL database from
unexpected third parties’ intrusions (Harkins, 2004; Larsen, 2007).
In case of providing an individual with access to the class information with intent to
view student and class information, it would be necessary to do the following: this user needs
to get login and password to the database to be able to create and alter schedule. Database
6. PHASE 3 IP 6
object access should be granted as well, however, the rights for writing changes to the
database must not be given. Therefore, this user will be able to view the necessary
information in the read-only mode (Harkins, 2004; Larsen, 2007).
Thus, class scheduler will be protected from the opportunity to unintentionally change
something in the database and write the changes. In addition, any parties will not be able to
use his/her login and password to alter the database. All these advantages are granted by the
distributed security system of SQL server (Harkins, 2004; Larsen, 2007).
INSERT INTO classes (classescode, classesname, description) VALUES
(‘ACCT306’, ‘Accounting 1’, ‘This course introduces accounting concepts
and explores the accounting environment. It covers the basic structure of
accounting, how to maintain accounts, use account balances to prepare
financial statements, and complete the accounting cycle. It also introduces the
concept of internal control and how to account for assets.’);
INSERT INTO classes (classescode, classesname, description) VALUES (‘CS362’,
‘Structured Query Language for Data Management’, ‘This course gives
complete coverage of SQL, with an emphasis on storage, retrieval, and
manipulation of data.’);
INSERT INTO classes (classescode, classesname, description) VALUES (‘ENG115’,
‘English Composition’, ‘In this course, students focus on developing writing
skills through practice and revision. Students will examine expository, critical,
and persuasive essay techniques.’);
INSERT INTO classes (classescode, classesname, description) VALUES (‘FIN322’,
‘Investments’, ‘This course focuses on investments and investment strategies.
Various investment vehicles such as stocks, bonds, and commodities are
examined. Students will explore the principles of security analysis and
valuation.’);
INSERT INTO advisors (firstname, second name, emailaddr) VALUES (‘Fred’,
‘Stone’, ‘fred@college.edu’), (‘Bob’, ‘Gordon’, ‘bob@college.edu’), (‘Jack’,
‘Simpson’, ‘jack@college.edu’);
INSERT INTO students (firstname, secondname, birthdate, gender, startdate, gpa,
isactive, advisorid) VALUES (‘Craig’, ‘Franklin’, ‘1970-03-15’, ‘Male’,
7. PHASE 3 IP 7
‘2010-05-30’, ‘3.10’, ‘Yes’, ‘3’), (‘Harriet’, ‘Smith’, ‘1982-04-15’, ‘Female’,
‘2010-05-30’, ‘3.22’, ‘Yes’, ‘1’), (‘George’, ‘David’, ‘1984-11-05’, ‘Male’,
‘2010-10-01’, ‘0.00’, ‘Yes’, ‘3’), (‘Ben’, ‘Jefferson’, ‘1976-09-25’, ‘Male’,
‘2009-02-21’, ‘1.80’, ‘No, the student has gone on temporary leave to pursue
other opportunities but plans on returning in 1 year.’, ‘3’);
DELETE FROM classes
WHERE classesname=‘Investments’;
UPDATE students
SET birthdate=’1982-04-25’,
GPA=3.25
WHERE firstname=’Harriet’ AND secondname=’Smith’
Subpart B.
Considering the need in screen for the class scheduler, it is necessary to analyze the
possible approaches of the interface with the database: using stored procedures or passing in
the raw queries directly.
Thus, according to Chapple (2012) the first method can be described as follows:
stored procedures accept data in the form of input parameters that are specified at execution
time. These input parameters (if implemented) are utilized in the execution of a series of
statements that produce some result. This result is returned to the calling environment
through the use of a recordset, output parameters and a return code. That may sound like a
mouthful, but you'll find that stored procedures are actually quite simple.
The advantages are as follows: precompiled execution, reduced client/server traffic,
efficient reuse of code and programming abstraction, and enhanced security controls. It
means that SQL Server compiles each procedure and then uses it when it is called. It reduces
traffic and allows using procedures by multiply users and programs simultaneously. In
addition, it provides extra security because procedures’ execution can be controlled regarding
to the table of permissions or gran user permission to execute this procedure regardless to this
table. The disadvantage is inability to variety the execution process according to the emerging
8. PHASE 3 IP 8
needs of a user. It would require changes in the procedure and its recompilation that would be
rather difficult to perform (Chapple, 2012).
Passing in the raw queries directly would provide users with opportunity to create
unique queries to perform unique functions each time. However, it increases the traffic and
results in rather inefficient performance of the SQL Server. On the other hand, it is the
possibility to create queries that would be the most accurate and provide the exact results that
are required. In case if there are no suitable procedures that would fit the requirement of a
user, the results might not be satisfactory (Chapple, 2012).
Understanding the purpose of the class scheduler, the screen should have the
following functionality. Because the structure of the database should not change after its
creation, it would be appropriate to use stored procedures to retrieve information using
screen. Thus, the user will be able to sort information by various fields (gender, GPA,
StartDate, IsActive, etc.); see who are the advisors of the particular students and how many
students each advisor has; how many classes each student attends and what these classes are;
and review ClassGPA for each class.
The users should be able to input the text into the text boxes (students’ and advisors’
names, for example), choose the classes, genders, active/inactive status, etc. from the drop-
down lists, use buttons and checkboxes for the various purposes. Among these purposes the
comparison of the GPAs can be noted, sorting according the highest GPA combined with
classes and students’ names, checking additional sub conditions using checkboxes, etc.
The screen should be used according to the user interface and interact with these
controls accordingly. It means that it must provide the appropriate, meaningful information,
avoid senseless outputs, and give accurate, up-to-date data.
SELECT * FROM students
WHERE gender = ’Male’
AND isactive = ‘Yes’
9. PHASE 3 IP 9
AND advisorid = 1
OR advisorid = 3;
SELECT * FROM students
WHERE bio IS NULL;
SELECT * FROM classes
WHERE classcode LIKE ‘ENG’;
SELECT students.lastname, students.birthdate, students.gender, students.GPA,
advisors.lastname FROM students, advisors
WHERE students.advisortid = advisor.advisorsid
ORDER BY advisor.lastname
AND ORDER BY students.lastname
SELECT * FROM students
WHERE birthdate BETWEEN 1980
AND 1990
SELECT GPA FROM students
WHERE gender = ‘Male’
AND gender = ‘Female’
SELECT * FROM students, advisors
WHERE students.advisorid = advisors.advisorid
AND student.isactive = ‘Yes’
AND student.isactive < 2
In order to accommodate degree programs, the design of the database was extended
accordingly.
CREATE TABLE degrees (
id INTEGER
degreeid INTEGER PRIMARY KEY,
degreename VARCHAR
degreedescr VARCHAR
);
INSERT INTO degrees (degreename, degreedescr) VALUES (‘Bachelor’, ‘Academic
degree awarded for an undergraduate course or major that generally lasts for
four years’), (‘Master’, ‘Academic degree granted to individuals who have
undergone study demonstrating a mastery or high-order overview of a specific
10. PHASE 3 IP 10
field of study or area of professional practice’), (‘Doctor of Philosophy’,
‘Postgraduate academic degree awarded by universities’);
Subpart A.
CREATE FUNCTION SumGPA ()
RETURN @GPA INTEGER
(
studentId INTEGER
classstartdatestart DATETIME
classstartdateend DATETIME
)
AS
BEGIN
SELECT SUM(GPA) FROM students
WHERE startdate >= classstartdatestart
AND startdate <= classstartdateend
RETURN GPA
END
CALL SumGPA (1, 2010-05-30, 2010-07-30)
Subpart B.
CREATE FUNCTION GradeBook ()
RETURN @GradeBook TABLE
(
classid INTEGER
)
AS
BEGIN
SELECT assignment1+assignment2+assignment3+assignment4 FROM
students_classes
WHERE stundents_classes.studentid = studentid
SELECT firstname, lastname FROM students
WHERE studnetid = stundents_classes.studentid
RETURN SUM(GPA)
RETURN GradeBook
END
CALL GradeBook (2)
Subpart C.
studentid
studentclassid
classid
advisorid
degreeid
11. PHASE 3 IP 11
CREATE INDEX idxStudents
ON students (studentid)
CREATE INDEX idxStudentsClasses
ON studentsclasses (studentclassid)
CREATE INDEX idxClasses
ON classes (classid)
CREATE INDEX idxAdvisors
ON advisors (advisorid)
CREATE INDEX idxDegrees
ON degrees (degreeid)
12. PHASE 3 IP 12
References
Chapple, M. (2012). SQL Server Stored Procedures. Retrieved from:
http://databases.about.com/od/sqlserver/a/storedprocedure.htm
Chigrik, A. (2007). SQL Server 2000 vs Access 2000. Retrieved from:
http://www.mssqlcity.com/Articles/Compare/sql_server_vs_access.htm
Harkins, S. (2004). Understanding roles in SQL Server security. Retrieved from:
http://www.techrepublic.com/article/understanding-roles-in-sql-server-
security/1061781
Larsen, G. A. (2007). SQL Server Security Model. Retrieved from:
http://www.databasejournal.com/features/mssql/article.php/3713116/SQL-Server-
Security-Model.htm
Quackit.com (2010). Microsoft Access Versus SQL Server. Retrieved from:
http://www.quackit.com/microsoft_access/tutorial/microsoft_access_versus_sql_serve
r.cfm
Sqlserver2000.databases.aspfaq.com (2001). What are the main differences between Access
and SQL Server? Retrieved from: http://sqlserver2000.databases.aspfaq.com/what-
are-the-main-differences-between-access-and-sql-server.html