|
How about learning CSS? (or HTML...)
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Please go through my first line.
"I have HTML content in string variable (from to ) within store procedure"
As i mentioned, this need to be achieved in STORE PROCEDURE. How to do this?
|
|
|
|
|
Hello,
I'm looking for a free (or cheap) and simple tool to design a SQL database. I just would like to be able to generate the standard SQL from the tool.
What do you suggest?
|
|
|
|
|
|
Microsoft® SQL Server® 2008 Management Studio Express? With Management Studio Express I can create tables then generate SQL for MySQL?
|
|
|
|
|
B413 wrote: generate SQL for MySQL?
Where in your original post did you say MySQL? If a generic SQL question is asked here, more that likely, the response will be Microsoft SQLServer biased.
|
|
|
|
|
If you need tools for MySQL go to it's home site and look for Workbench...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
TOAD has always been a decent tool
TOAD freeware for MySQL[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
|
No#1 Option: ERwin Community Edition
No#2 Option: Toad Data Modeler freeware edition
No#3 Option: Oracle SQL Developer Data Modeler.
In [free] world, nothing else come closer to this.
|
|
|
|
|
CUSTOMER (Cust#, Cname, City)
ORDER (Order#, Odate, Cust#, Ord_Amt)
ORDER_ITEM (Order#, Item#, Qty)
ITEM (Item#, Unit_price)
SHIPMENT (Order#, Warehouse#, Ship_Date)
WAREHOUSE (Warehouse#, City)
List the orders that were not shipped within 14 days of ordering.
Produce a list of Cname who has not placed any orders.
|
|
|
|
|
It's not a "relational algebra equation" - the assignment is to write a thing called a "query". A "select query" to be more exact.
I can help with the assignment if you have a specific question, but I'm not going to give the solution. If you're looking how to get started, then I suggest you write a script to generate said tables with some testdata.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
If this is a relational algebra question in the sense of just math, probably can't help.
If it is a database question looking for a query, something like:
select order.order#
from order o left outer join shipment s
on order.order# = shipment.order#
where (shipment.ship_date is null and datediff(d, order.odate, getdate()) > 14) or
datediff(d, order.odate, shipment.ship_date) > 14
select cname from
(select cname, o.cust#, count(o.order#)
from customer c left outer join order o
on c.cust# = o.cust#
group by cname, o.cust#
having count(o.order#) = 0)
|
|
|
|
|
Much better for the second query:
select cname
from CUSTOMER c
left join [ORDER] o
on c.cust# = o.cust#
WHERE o.order# IS NULL
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
Tim Carmichael wrote: If this is ... It's actually a homework question.
|
|
|
|
|
|
1)
∏{order#} (∑{datediff(ODate,Today)>14}
(REN o(ORDER) θ{o.order#=ons.order#} REN ons( ∏ {oredr#} (ORDER) - ∏ {oredr#} (SHIPMENT))))
2)
∏{CName} (REN c(CUSTOMER) θ{c.Cust#=onp.Cust#} REN onp( ∏ {Cust#} (CUSTOMER) - ∏ {Cust#} (ORDER)))
Operators used:
∑ is SELECT
∏ is PROJECT
θ is THETA JOIN
- is SET DIFFERENCE
REN is RENAME
{} is for enclosing expressions
|
|
|
|
|
Hi
I have executed package through command line its working fine. The same package executed in SQL SERVER AGENT throwing exception. Please find the exception below
Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 11.0.2100.60 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 5:13:13 AM Could not load package "C:\Packages\ITEMMASTER_IMPORT.dtsx" because of error 0x80131534. Description: The package failed to load due to error 0x80131534 "(null)". This occurs when CPackage::LoadFromXML fails. Source: {C45D90C3-5C86-4B77-B2D6-6A6261230041} Started: 5:13:13 AM Finished: 5:13:13 AM Elapsed: 0.078 seconds. Process Exit Code 5. The step failed.
|
|
|
|
|
Does the user "SQLSERVERAGENT" have the same rights as the user that is using the command-line?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hello,
I have 2 MSSQLDB 2008 same version and installed on simillar enviroment ,i implement Transactiona Replication but each time need reinitalizing subscriber and generate new snapshoot to syncronize the data.
if there is solution to do it automaticlly knowing i tried same implemntation on test DB and work normally.
Thank you.
|
|
|
|
|
I've written lots of small applications where I work, developing the databases in SQL Server, which is my forte, and the front ends in ASP.NET. When I've been doing it all myself it's been easy because, as the application developer, I know the databases and have no trouble writing ad-hoc queries in the application or, more often, calling Stored Procedures that I've written, knowing what parameters are required, and so on.
But now I'm embarking on a much larger project, for which we'll be hiring developers to write the application. I'm just writing the database. My plan was to write well-documented Stored Procedures to perform every operation required on the database - inserting, updating, deleting, retrieving records, and so on, and then letting the developers just call these procedures from the application without them needing to know the database's structure, effectively creating an API. If I have time, I also intended to write web services as an intermediate level for them to use, so that they call these services rather than the Stored Procedures. I don't know how much benefit there is to doing this for the core .NET application, but since we intend to also create mobile apps down the line, the same services could be used for those as well.
This morning I've been reading about CRUD and writing RESTful services and so on (not completely understanding it all), and now I'm starting to wonder if I'm missing something. I want to set up an API, so to speak, that will seem sensible, easy to work with and perhaps even familiar to our experienced developers after they are recruited, but since this is the first time I've worked in this way I'm not really sure what they'll be expecting. I want to work in line with best practice to deliver a successful project and an excellent product. Does my proposed plan fit this requirement, or should I be doing something else?
EDIT: Maybe I'd get more useful replies if this was in the Web Development thread? Can a mod move it?
|
|
|
|
|
Design and Architecture would probably be a better forum but the same people will look at it as here...
If you are confident at designing the data structure and getting it right then I would suggest doing everything up to the WCF/Service layer. However as you sound like a particularly advanced power user I would probably look at getting a senior dev to work with you on the database and service and when that is in place get the UI devs on board to complete the application.
Be prepared to change your design as dictated by the UI, forget the crap about agile you may hear, the best apps are built by people who recognise a design error early and fix it NOW.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks for the tips. I definitely agree that being flexible, as far as possible, and changing things in response to design challenges that arise is important.
|
|
|
|
|
phil2415 wrote: This morning I've been reading about CRUD and writing RESTful services and so on (not completely understanding it all)
Rest applies to the application server not to the database. The application server deals with a data model where objects in that often but not always map to tables in the database. It that 'not always' part that means that the application server should have its own data model and then map that to the database.
The stored procedures provide the access layer to the database. Far as I am concerned they (stored procs) server the same purpose as any other application layer so I am in favor of them. Additionally I consider the permissions possible with them a win.
phil2415 wrote: I'm not really sure what they'll be expecting.
First thing of course is that someone, somewhere needs to come up with a data model. Doesn't need to be formal but a team (more than one person) can't work without a division of labor and so they need to target a data model and so do you. You should of course be prepared to participate in that process. You might even be the sole person given that you have experience both in database and application development.
Your role other than that would be in insuring that the data model is not going to impose problems such as performance. Then normal DDL development with any additional database tests (archive, back up, etc) that would normally be identified in any production system.
Depending on the team/project you might also be in charge of writing the application side abstraction layer - the thing that interfaces with the stored proc.
Of course one potential problem with all of the above is that one of the incoming people already has an idea how the database should be done and it doesn't jive with your view.
|
|
|
|
|
Thanks for the advice. I'm already devising the data model for the database. My idea is that before the developers even arrive, the bulk of the database will be written and SPs in place for handling fundamental operations. I've no doubt that changes will need to be made once the development team starts, but hopefully the basic foundations should be fairly sound.
|
|
|
|