Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2015
    Posts
    3

    Unanswered: My SQL Homework Assistance

    Hey,
    I'm currently enrolled in a database design class at my university that focuses on MySQL, and DB design is not my forte, to say the least. I have an assignment that I need assistance with, and I figured this might be the best place to ask. Any help would be greatly appriciated, as I really do want to succeed in this course.

    Here is the assignment:

    Describe the difficulties that will be encountered in these queries

    1.

    USE Master
    SELECT TOP 1000 [ListingID]
    ,[PropertyID]
    ,[ListingAgentID]
    ,[SaleStatusID]
    ,[BeginListDate]
    ,[EndListDate]
    ,[AskingPrice]
    ,[HousePhoto]
    FROM [Listings]




    2.

    SELECT [CustomerID]
    ,[FirstName]
    ,[LastName]
    [Address],
    [City] [State]
    ,[Zipcode]
    ,[HomePhone]
    [WorkPhone]
    FROM [RedwoodRealty].[dbo].[Customers]




    3.

    SELECT [LicenseStatusID]
    ,[StatusText]
    FROM [RedwoodRealty].[dbo].[LicenseStatus]
    SORT BY StatusText




    4.

    UPDATE [RedwoodRealty].[dbo].[CustAgentList]
    SET ListingID = '1400A'
    WHERE CustomerID = 25019
    AND AgentID = 15293


    5.

    USE RedwoodRealty
    SELECT [ListingID]
    ,[PropertyID]
    ,[ListingAgentID]
    ,[FirstName]
    ,[LastName]
    ,[SaleStatusID]
    ,[BeginListDate]
    ,[EndListDate]
    ,[AskingPrice]
    FROM [Listings]
    INNER JOIN Agents Agents.AgentID = Listings.AgentID

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Are you really running MySQL from Oracle, or could you be running a different database product?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Sep 2015
    Posts
    3
    Quote Originally Posted by Pat Phelan View Post
    Are you really running MySQL from Oracle, or could you be running a different database product?

    -PatP
    I'm sorry, we're running SQL Server Express.

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    *** Poof ***

    Cough, gack... Snort, cough! Ugh, I hate it when I use the wrong wand. Anywho, now your post is in the Microsoft SQL Server forum so it has a lot better chance of getting correct (or at least somewhat more appropriate) answers.

    First, a couple more questions:
    1. Do you have a copy of the RedwoodRealty database?
    2. Have you tried to run any of the code samples that you've posted?
    3. If so, what happened when you tried each of them?
    4. If not, why didn't you try?

    These questions seem trivially easy for a University class, so I'm trying to figure out "what's the catch?" so that I can do a better job helping you. Is this a business class that touches on databases, or is it part of an actual IT or Comp-Sci curriculum? What the course tries to teach and the type and level of understanding that is expected has a lot of influence in how you should be expected to answer.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  5. #5
    Join Date
    Sep 2015
    Posts
    3
    Quote Originally Posted by Pat Phelan View Post
    *** Poof ***

    Cough, gack... Snort, cough! Ugh, I hate it when I use the wrong wand. Anywho, now your post is in the Microsoft SQL Server forum so it has a lot better chance of getting correct (or at least somewhat more appropriate) answers.

    First, a couple more questions:
    1. Do you have a copy of the RedwoodRealty database?
    2. Have you tried to run any of the code samples that you've posted?
    3. If so, what happened when you tried each of them?
    4. If not, why didn't you try?

    These questions seem trivially easy for a University class, so I'm trying to figure out "what's the catch?" so that I can do a better job helping you. Is this a business class that touches on databases, or is it part of an actual IT or Comp-Sci curriculum? What the course tries to teach and the type and level of understanding that is expected has a lot of influence in how you should be expected to answer.

    -PatP
    I do not have a copy of the database, thus I can't try running the samples. It's a business class that is focused on data management/design.

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Q:
    Quote Originally Posted by StevenFletcher
    Describe the difficulties that will be encountered in these queries
    A:
    Quote Originally Posted by StevenFletcher
    I do not have a copy of the database, thus I can't try running the samples.
    seems like an open and shut case to me
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Quote Originally Posted by StevenFletcher View Post
    I do not have a copy of the database, thus I can't try running the samples.
    Not having the database makes it harder to test these scripts, but not impossible.

    1. Download a copy of SQL Express from Microsoft from http://www.microsoft.com/en-us/downl....aspx?id=42299 and install it on your machine. Microsoft doesn't charge for the Express Edition, and it isn't hard to get or to install.
    2. Create a RedwoodRealty database (the default parameters will be fine for this case).
    3. Create the tables referenced by the script (Agents, Customers, Listings, CustAgentList)
    4. Now you can run the script!

    This will get you some experience using Microsoft SQL Express, and give you concrete and demonstratable answers to these questions!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •