MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table...
-
Upload
aldous-derick-dorsey -
Category
Documents
-
view
219 -
download
0
Transcript of MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table...
![Page 1: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/1.jpg)
MIS 215 Lab Revision
I. MSQL Server InstallationII. Create a New DatabaseIII. Create a New TableIV. Relationships
![Page 2: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/2.jpg)
I. MSQL Server Installation
Open the (.ISO) file located in the CD Drive
Then open the (.exe) file to start the installation process
![Page 3: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/3.jpg)
This window will appear
• Then select the first option from the Right menu
• Select “Installation”
![Page 4: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/4.jpg)
Click on the Next button until you reach the “Setup Role”
Make sure to select the second option
• Continue to press Next.
When you see any thing like this picture click on the “Add Current User” button
![Page 5: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/5.jpg)
II. Create a New Database:
Contact with the server by clicking on the contact button
![Page 6: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/6.jpg)
Right click on the Databases file and select “New Database”
![Page 7: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/7.jpg)
• Enter the database name here
• If you want to change the Files location click on those buttons
![Page 8: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/8.jpg)
The New Database will appear under the “Databases file”
If it did not appear try clicking the refresh button
![Page 9: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/9.jpg)
III. Create a New Table: Right click on the Tables file and select “New Table”
![Page 10: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/10.jpg)
Fill the “Column Name” and the “Data Type” of the table that you want to create
Then save you're table by clicking on the save button
Name you’re table and press OK
![Page 11: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/11.jpg)
The New Table will appear under the file “Tables” of the database you’re working on which is the database “Restaurant”
If it did not appear try clicking the refresh button
If you want to Edit the tables “Right click” on the table and select “Design” from the list.
![Page 12: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/12.jpg)
Filling The Tables:
“Right click” on the table and select “Edit Top 200 Rows” from the list.
Then fill the tables
![Page 13: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/13.jpg)
IV. Relationships:1.Primary keys:
First make sure that the primary keys are set on the tables you’re working on.
Select the Row you want to make as a primary key
Click on the “Key” button
It will look like this
![Page 14: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/14.jpg)
Select two or more Rows using “Ctrl+Left click” on each one.
Click on the “Key” button
It will look like this
2. Composite Primary key:
Make sure to select the row not part of it by clicking on the “Blank Column”.
![Page 15: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/15.jpg)
3. Relationship Diagrams:
Right click on the “Database Diagrams” file
Select “New Database Diagram”
Then Add the tables you want in you’re Diagram by clicking on the Add button
![Page 16: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/16.jpg)
And the primary key is contacted to a Column with “the same data type”
Left click on the Customer_ID and drag it to C_ID and drop it there
And that will give us a one to many relationship
Make sure that the primary keys are set
![Page 17: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/17.jpg)
This two window will appear Press the OK button “two
times”
The relationship should look like this
![Page 18: MIS 215 Lab Revision I. MSQL Server Installation II. Create a New Database III. Create a New Table IV. Relationships.](https://reader035.fdocuments.net/reader035/viewer/2022062314/56649ede5503460f94beec34/html5/thumbnails/18.jpg)
To add more tables to the Diagram Right click on the blank space of the diagram and select Add Table
Then save you’re Diagram after naming it and press OK