

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The steps to set up a microsoft sql server database, including creating a client connection, registering the sql server, creating a database and table, establishing relationships between tables, creating views, and making a local copy of the database using microsoft access and odbc. It is intended for students or professionals looking to learn how to create and manage a sql database.
Typology: Study notes
1 / 3
This page cannot be seen from the preview
Don't miss anything!


Start‡Programs‡Microsoft SQL Server‡Client Network Utility Click on the ALIAS tab Click ADD. Enter Server Alias: CALHOUN Select TCP/IP in Network Libraries. Specify Server name: CALHOUN Deselect the check box on Dynamically Determine Port. Enter port number: 5000 Click OK and exit. Click APPLY and exit.
HOW TO CREATE A DATABASE USING A MS-SQL CLIENT
Start‡Programs‡Microsoft SQL Server‡Enterprise Manager Right click on SQL Server Group Select New SQL Server Registration On the Welcome dialog box, click the next button On the Register SQL Server Wizard dialog enter CALHOUN for the available servers, click add , then click next Select the SQL Login Information… radio button. Enter login name and password. Click next on the Select SQL Server Group dialog, then click on the finish button in the next dialog window.
Expand the SQL Server Group tree by clicking on the + box-icon. Expand the CALHOUN tree by clicking on the + box-icon. Right click on Databases, select the New Database option Provide a database name: Use whatever name you want (say, CourseDBX) Right click on database, CourseDBX. Select new ‡ Table Enter the table parameters: StudID*, FName, LName, Address, Gender, GPA, Status. *make sure that you don't allow nulls on the StudID attribute.
Right click on the StudID row and select Primary Key. This will make the StudID as the primary key of the table. Close the new table dialog box. The system will prompt you to save the table, click yes and enter the table name, Student.
Right click on Student table, select Open Table‡Return all rows Enter the data values for each row.
Right click on the Student table, select Design Table Click on the manage relationship icon
Click New to establish a new relationship on selected tables. Use the appropriate drop-down boxes to choose the primary key table, the foreign key table, the primary key attribute, and the foreign key attribute. Click close. Close the table and answer yes to the succeeding dialog boxes.
CREATING VIEWS
Click on Views‡New View Click on the Add Table icon
On the Add Table dialog box , select the Student table and click Add. On the table pane, click on the FName, StudID, and GPA checkboxes On the grid pane enter >103 for the StudID criteria and >2.0 for the GPA criteria
Click on the run icon to execute the query.
Exit the dialog box and save the view as StudentGPA.
To check the view, right click on StudentGPA ‡ Open View ‡ Return All Rows
CREATING A LOCAL COPY OF THE SQL SERVER DATABASE
Create a blank database using Microsoft Access, call it CourseDBX.mdb. A blank Access database file, template.mdb , is available in F:\USER\GFRANCIA\CS. Copy this file in your local drive and rename it to CourseDBX.mdb.
Right click on Databases. Select All Tasks ‡ Export Data Click next on the DTS Import/Export Wizard Dialog Box. On the Choose a Data Source dialog, make sure the following are set: Server: CALHOUN Use SQL Server Authentication user name: enter your username password: enter your password Database: the name of your database Click next.