Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with my homework, write clearly pls TABLES SHOULD BE DESIGNED FOR A DENTIST OFFICE! Keep in mind p 2 - What is Database

Please help with my homework, write clearly pls
TABLES SHOULD BE DESIGNED FOR A DENTIST OFFICE! Keep in mind
image text in transcribed
image text in transcribed
image text in transcribed
p 2 - What is Database Design? In an attempt to better understand just how tables work and are used, we will take a short look at Database Design. Once we have designed a small database, we will understand just how a database works. Then we will start looking at the SQL commands, in Chap 3. - Getting Started with Database Design The first thing that you need to do is come up with a list of entities, nouns. These will be our tables. So step \# 11 is to Brainstorm what nouns are part of our Application. - Database Design Steps Let's say we are going to design a database for a small college. Step 11 would be to think of all the nouns that are part of a college. Nouns: Students, Instructors, Courses, Sections and Schedules. These nouns need to be larger entities that have many properties. For example a Student is an Entity, but a firstname is not. Firstname is just a simple noun. A student has multiple parts. Step 12 - Once we have our major Entities determined(these will become our tables), we next decide on properties/columns for each table. Rules for naming Columns. 1.) Column names cannot have spaces 2.) Column names cannot contain special chars like * or % 3.) Column names cannot be key words like 'FROM' or 'SELECT' The Students Table will have a Firstname, a Lastname, an addr an email, a major and a gpa. We will also add a Primary Key, StudentiD. So the Students Table will have 7 columns. The Instructors Table will have a Firstname, a Lastname, an Address, an email, and an office. We will also add a Primary Key, InstiD. So the instructors Table will have 6 columns. The Courses Table will have a CourseName, a Description and CreditHours. We will also add a Primary Key, CourselD. So the Courses Table will have 4 columns. The Sections Table will have a CourselD, a TimeDay, a roomNo and an instructor. We will also add a Primary Key, CRN. So the Sections Table will have 5 columns. The StudentSchedule Table will have a StudenytiD and a CRN. So the StudentSchedule Table will have only 2 columns. Step #3 - Now we need to decide on the datatypes for each column in each table. Let's start with the Students Table. The StudentiD column is probably going to be something like char(9). At CTC your StudentlD is char(9). Exactly 9 chars and no more or no less. The firstname and lastname columns will be varchar(30), variable length character, since we do not know how long each firstname or lastname will be. Address and email can also be varchar(40). Major may be char(4). Each major code is always 4 characters. And gpa will be numeric. Step \#A - Next we have to determine which columns are required and which are optional. Required columns will be 'not null' and optional columns will be 'null'. Not null means a column has to be given before a new row can be added to the table. Null means that the data is not needed when a row is first created, it can be added later. Si for the Students table, StudentiD is 'not null', required. Firstname is 'not null', required. Lastname is 'not null', required. Address is 'not null', required. Email is 'null', optional. Major and gpa are also 'null', optional. So if a user wants to enter a new Student, they must provide a StudentiD(sometimes the database generates this), a firstname, a lastname and an Address. Email, major and gpa can be added later. Step \#5 - And finally we need to decide on a Primary Key. For our Students Table that will be the StudentID. Below is a completed Students Table design: Students Table Summary Database Design Steps Step $1 - determine tablesimajor entities) Step $2 - For each table, determine which columns are needed. Step 83 - for each column determine the datatype needed for that column. Step 44 - for each column determine 'not null'(reguired) or 'nulliopticants). Step 05 - for each table decide on a Primary Key

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

What does herpes (virus) have to do with Multiple Sclerosis?

Answered: 1 week ago

Question

6. What data will she need?

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago