Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Solmaris is offering a monthly discount for owners who pay their condo fees on a

ID: 3834555 • Letter: S

Question

Solmaris is offering a monthly discount for owners who pay their condo fees on a quarterly basis. The discount is 1.75 percent of the monthly fee. For each condo, list the location number, unit number, owner number, owner’s last name, condo fee, and discount. The discount should be rounded to the nearest dollar.

PLEASE READ AND UNDERSTAND BEFORE YOU POST! MAKE SURE YOU TEST YOUR ACCESS SQL TO KNOW THAT IT WORKS.

EE LOCATION LOCATION NUM LOCATION NAME ADDRESS CITY STATE POSTAL CODE Click to Add 1 Solmaris Ocean Bowton FL. 31313 100 Ocean Ave 2 Solmaris Bayside 40s Bayside Blvd. Glander Bay FL 31044

Explanation / Answer

You can use the database for tasks such as generating reminders for upcoming pet birthdays. (If you think this type of query is somewhat silly, note that it is the same question you might ask in the context of a business database to identify clients to whom you need to send out birthday greetings in the current week or month, for that computer-assisted personal touch.)

You can calculate age in relation to dates other than the current date. For example, if you store death date in the database, you can easily calculate how old a pet was when it died.

You can probably think of other types of information that would be useful in the pet table, but the ones identified so far are sufficient: name, owner, species, sex, birth, and death.

Use a CREATE TABLE statement to specify the layout of your table:

values like this for the table and latter connect it with access.

SQL ALTER TABLE Statement

The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.

The ALTER TABLE statement is also used to add and drop various constraints on an existing table.

ALTER TABLE - ADD Column

To add a column in a table, use the following syntax:

ALTER TABLE table_name
ADD column_name datatype;

ALTER TABLE - DROP COLUMN

To delete a column in a table, use the following syntax (notice that some database systems don't allow deleting a column):

ALTER TABLE table_name
DROP COLUMN column_name;

ALTER TABLE - ALTER/MODIFY COLUMN

To change the data type of a column in a table, use the following syntax:

SQL Server / MS Access:

ALTER TABLE table_name
ALTER COLUMN column_name datatype;

My SQL / Oracle (prior version 10G):

ALTER TABLE table_name
MODIFY COLUMN column_name datatype;

Oracle 10G and later:

ALTER TABLE table_name
MODIFY column_name datatype;

VARCHAR is a good choice for the name, owner, and species columns because the column values vary in length. The lengths in those column definitions need not all be the same, and need not be 20. You can normally pick any length from 1 to 65535, whatever seems most reasonable to you. If you make a poor choice and it turns out later that you need a longer field, MySQL provides an ALTER TABLEstatement.

Several types of values can be chosen to represent sex in animal records, such as 'm' and 'f', or perhaps 'male' and 'female'. It is simplest to use the single characters 'm' and 'f'.

The use of the DATE data type for the birth and death columns is a fairly obvious choice.

Once you have created a table, SHOW TABLES should produce some output:

To verify that your table was created the way you expected, use a DESCRIBE statement:

You can use DESCRIBE any time, for example, if you forget the names of the columns in your table or what types they have.

Change Data Type Example

Now we want to change the data type of the column named "DateOfBirth" in the "Persons" table.

We use the following SQL statement:

ALTER TABLE Persons
ALTER COLUMN DateOfBirth year;

Notice that the "DateOfBirth" column is now of type year and is going to hold a year in a two- or four-digit format.

DROP COLUMN Example

Next, we want to delete the column named "DateOfBirth" in the "Persons" table.

We use the following SQL statement:

ALTER TABLE Persons
DROP COLUMN DateOfBirth;

SQL Hosting

If you want your web site to be able to store and retrieve data from a database, your web server should have access to a database-system that uses the SQL language.

If your web server is hosted by an Internet Service Provider (ISP), you will have to look for SQL hosting plans.

The most common SQL hosting databases are MS SQL Server, Oracle, MySQL, and MS Access.

MS SQL Server

Microsoft's SQL Server is a popular database software for database-driven web sites with high traffic.

SQL Server is a very powerful, robust and full featured SQL database system.

Oracle

Oracle is also a popular database software for database-driven web sites with high traffic.

Oracle is a very powerful, robust and full featured SQL database system.

MySQL

MySQL is also a popular database software for web sites.

MySQL is a very powerful, robust and full featured SQL database system.

MySQL is an inexpensive alternative to the expensive Microsoft and Oracle solutions.

Access

When a web site requires only a simple database, Microsoft Access can be a solution.

Access is not well suited for very high-traffic, and not as powerful as MySQL, SQL Server, or Oracle.

Creating a Data Connection to a SQL Server Database

To create a data connection to a SQL Server database

In Server Explorer/Database Explorer click Connect to Database.

In the Choose Data Source dialog box, select Microsoft SQL Server, and then click OK.

If the Add Connection dialog box opens, and the Data source is not Microsoft SQL Server, click Change to open the Choose/Change Data Source dialog box. For more information, see Choose/Change Data Source Dialog Box.

Select a server name from the drop-down list, or type the name of the server where the database you want to access is located.

Based on the requirements of your database or application, select either Windows Authentication or use a specific user name and password to log on to the SQL Server (SQL Server Authentication). For more information, see Add/Modify Connection (Microsoft SQL Server).

Select the database you want to connect to from the drop-down list.

Click OK.

To determine the name of the instance of the Database Engine

Log into Windows as a member of the Administrators group, and open Management Studio.

In the Connect to Server dialog box, click Cancel.

If Registered Servers is not displayed, on the View menu, click Registered Servers.

With Database Engine selected on the Registered Servers toolbar, expand Database Engine, right-click Local Server Groups, point to Tasks, and then click Register Local Servers. All instances of the Database Engine installed on the computer are displayed. The default instance is unnamed and is shown as the computer name. A named instance displays as the computer name followed by a backward slash () and then the name of the instance. For SQL Server Express, the instance is named sqlexpress unless the name was changed during setup.

To verify that the Database Engine is running

In Registered Servers, if the name of your instance of SQL Server has a green dot with a white arrow next to the name, the Database Engine is running and no further action is necessary.

If the name of your instance of SQL Server has a red dot with a white square next to the name, the Database Engine is stopped. Right-click the name of the Database Engine, click Service Control, and then click Start. After a confirmation dialog box, the Database Engine should start and the circle should turn green with a white arrow.

To connect to the Database Engine

At least one administrator account was selected when SQL Server was being installed. Perform the following step while logged into Windows as an administrator.

To show the Discount on the table below is the example:-

In Management Studio, on the File menu, click Connect Object Explorer.

The Connect to Server dialog box opens. The Server type box displays the type of component that was last used.

Select Database Engine.

In the Server name box, type the name of the instance of the Database Engine. For the default instance of SQL Server, the server name is the computer name. For a named instance of SQL Server, the server name is the , such as ACCTG_SRVRSQLEXPRESS. The following screenshot shows connecting to the default (un-named) instance of SQL Server on a computer named 'PracticeComputer'. The user logged into Windows is Mary from the Contoso domain. When using Windows Authentication you cannot change the user name.

Click Connect.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote