How To Design Product Kits
Jul 20, 2005
Hi,
I've run into a bit of a sticky design issue. We have products in
three categories which I will call 'A', 'B' and 'C'. We have "kits"
which contain three products, one from each category.
Below is some sample SQL to set things up, but I need to ensure that
each kit gets three products -- one from each category. Obviously,
this basic SQL doesn't allow that. Any suggestions? Do I need a
different schema design, or is there something else I should be
looking at?
Cheers,
Curtis
CREATE TABLE category (
id int identity primary key,
name varchar(30)
);
CREATE TABLE products (
id int identity primary key,
name varchar(30),
category_id int references category(id)
);
CREATE TABLE kits (
id int identity primary key,
name varchar(30)
);
CREATE TABLE kit_products (
kit_id int references kits(id),
product_id int references products(id)
);
View 1 Replies
ADVERTISEMENT
Feb 10, 2006
Here is the current schema.
product_category
- product_category_id
- other fields, ...
product
- product_id
- product_category_id
- ....other fields
Now, for each product type, it has a distinct set of specifications. For example: Books type, will have author, publisher, pages, etc. Apparels type will have color, size, materials, etc. I don't think I can put all those specifications into one table - the product table above.
How to design the schema to store product specifications? Should I create a separate spec table for each product type, such as book_product_spec, apparel_product_spec, electronics_product_spec, etc.? Please advise. Thanks.
View 9 Replies
View Related
Aug 30, 2015
I am using the code below to get all the children of a particular product and it is working fine. How to get the particular product's id in the select statement. for example, i need to show 891 in a separate column for all the records returned by the query below.
DECLARE @Hierarchy TABLE (Product_Id INT, Parent_Product_Id INT)
INSERT INTO @Hierarchy VALUES (123, 234)
INSERT INTO @Hierarchy VALUES (234, 456)
INSERT INTO @Hierarchy VALUES (456, 678)
INSERT INTO @Hierarchy VALUES (678, 891)
INSERT INTO @Hierarchy VALUES (891, NULL)
[Code] .....
View 3 Replies
View Related
Aug 30, 2007
When I registered SQL Server Express I received an e-mail back showing all of the resources available to get started. There were 6 Starter Kits available, Teacher, Colection Manager, Amazon Enabled Movie Collection, and three others. When I click on the links to download the Starter Kits, the link comes back as invalid. Can you provide the correct links to use to get the Starter Applications, or can you e-mail me code? Thanks for you attention to this matter.
Charlie Cappello
CIGNA
View 5 Replies
View Related
Oct 19, 2007
I am new to sql server express editions.
starter kits and Sample applications link provided in the sites are not working.
Can anyone provide me the alternate link where I can dwnld them from
http://msdn2.microsoft.com/hi-in/express/bb403187.aspx
http://msdn2.microsoft.com/hi-in/express/aa718396.aspx
View 1 Replies
View Related
Apr 3, 2006
Hi, everyone!
I'm trying to practice with the website starter kits using Visual Studio
2005. But so far, I haven't been able to run the mentioned websites because
the connection they use is against SQL Server Express...
I don't have SQL Server Express. Instead, what I have installed is SQL
Server 2005 Standard Edition.
I'm not even able to use the new APS.NET WeSAT application to administer the sites because allway get the "Time out" error.
Do any of you know how to resolve this whole situation?
Thanks very much in advance for your help.
Ralph.
View 3 Replies
View Related
Sep 22, 2007
1. The download links shown below for the Starter Kits found at this URL do not work:
http://msdn2.microsoft.com/en-us/express/aa718396.aspx
Teacher Starter Kit
VB http://msdn.microsoft.com/vstudio/eula.aspx?id=4d31bb50-22da-411f-b747-a7b2288fc720
C# http://msdn.microsoft.com/vstudio/eula.aspx?id=06b20449-cbba-4f2f-ab8c-b99c1266cc7e
Collection Manager Starter Kit
http://msdn.microsoft.com/vstudio/eula.aspx?id=98c8074d-d28e-49e1-be44-94f0114f372a
Club Web Site EventCalendar control source code
http://www.asp.net/starterkits/downloads/eventcalendar.zip
2. None of the download links shown below for the Sample Applications found at this URL work:
http://msdn2.microsoft.com/en-us/express/bb403187.aspx
Internet Explorer Favorites Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=3bdccf1b-88c6-45a6-9dcf-7499ad664dab
Skills Manager Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=09305c92-890f-4dc7-a20d-f58b611d23c7
Survey Manager Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=98171070-e0f6-4fcd-948e-9c5af497ab4f
Help Desk Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=009e3b2d-98b1-46dc-8476-676a2519eafa
Reports for Web Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=79610b4f-fc7e-4ca8-9ae2-8ca8a5a6de0d
Reports for Windows Sample
http://msdn.microsoft.com/vstudio/eula.aspx?id=9c9a8d75-58b1-4be7-91be-50fefbe5d28c
View 2 Replies
View Related
May 13, 2015
I have a scenario like below
Product1
Product2 Product3
Product4 Product5
Product1 1
1 0 0
1
Product2 1
1 0 0
1
Product3 0
0 1 1
0
Product4 0
0 1 1
0
Product5 1
1 0 0
1
How to design tables in SQL Server for the above.
View 2 Replies
View Related
May 8, 2007
Hello I installed MS SQl 2005 the eval version and it has expired. I have bought a copy now and i need to put the product keys in without having to reinstall the program. Is there anyway i can do this with having to reinstall SQl again..
Any help would be great
Randy Martin
View 1 Replies
View Related
Feb 13, 2002
Ok, I'm doing a football database for fixtures and stuff. The problem I am having is that in a fixture, there is both a home, and an away team. The tables as a result are something like this:
-------
Fixture
-------
fix_id
fix_date
fix_played
----
Team
----
tem_id
tem_name
-----------
TeamFixture
-----------
fix_id
tem_id
homeorawayteam
goals
It's not exactly like that, but you get the point. The question is, can I do a fixture query which results in one record per fixture, showing both teams details. The first in a hometeam field and the second in an away team field.
Fixture contains the details about the fixture like date and fixture id and has it been played
Team contains team info like team id, name, associated graphic
TeamFixture is the table which links the fixture to it's home and away team.
TeamFixture exists to prevent a many to many type relationship.
Make sense? Sorry if this turns out to be really easy, just can't get my head around it at the mo!
View 2 Replies
View Related
Aug 18, 2015
I would like to create a table called product. My objective is to get list of packages available for each product in data grid view column while selecting each product. Each product may have different packages type (eg:- Nos, CTN, OTR etc). Some product may have two packages and some for 3 packages etc. Quantity in each packages also may be differ ( for eg:- for some CTN may contain 12 nos or in other case 8 nos etc). Prices for each packages also will be different that also need to show. Â How to design the table..Â
Product name  : Â
Nestle milk |
Rainbow milk
packages  :
CTN,OTR, NOs |
CTN, NOs
Price:
50,20,5 |
40,6
(Remarks for your reference):CTN=10nos, OTR=4 nos Â
| CTN=8 Nos
View 3 Replies
View Related
Aug 18, 1999
I want to upgrade 5 SQL Server 6.5 production boxes to SQL Server 7. I got
SQL Server 7.0 pricing and licensing list from
www.microsoft.com/sql/70/gen/pricing.htm and I think I should buy 5 SQL
Server 7.0 Combined Product/Version/Competitive Upgrade (Since I have been using SQL Server 6.5, I don’t need to buy the full product. Is this right?). I am not sure if
the upgrade offer (the price is much lower than the full product offer $699/$1399) includes the SQL Server 7.0 both software and access license.
Thanks for any help in advance.
Stella Liu
View 1 Replies
View Related
Jul 14, 2004
Hi,
I am interested in opinions on the following,
main(product_id, short_text, price, type)
productTypes(type_id, type)
productTables(type_id, tableName)
productA(product_id, field1, field2)
productB(product_id, field1, field2)
To retrieve all products of type 'A', one must know the table name, in this case 'productA'.
Here is one method.
Create a table that contains the table name that corresponds to each product type, thus the stored procedure only needs to recieve the type_id which can be used to obtain the name of the respective table.
View 1 Replies
View Related
Jul 3, 2006
how can i get the product of two fields in sql server?
ie. i want to get like this, - select price, qty, product(price,qty) as amount from xxx - like this
View 2 Replies
View Related
Feb 6, 2008
I am installing SQL Server x64 on a new server, and I was told to use the same license key we have for the other servers... but no one seems to know where it is. Is there any way I could see the license key for one of the working boxes so I could put it on the new one?
Thanks,
View 3 Replies
View Related
Jul 20, 2005
Does anyone know of a SQL Server product that would let me do the following?Connect to the instanceConfigure thresholds like,1.Show databases not backed up in the last X days2. Show databases that are full that have logs not backed up in the lastx days/hours.3. Show jobs that have failed in the last x days.I would then like to click a process button and have it bring back anythingthat is outside those thresholds?, any thing like that in a windowsapplication?
View 1 Replies
View Related
Mar 27, 2007
Hi All,
I have a field with numbers (double datatype) as values and I want a aggregate function that gives me the product of all the values in that field. Is there a way to do that in SSRS?
View 2 Replies
View Related
Oct 27, 2006
I can't find any timeframe for the 1.0 release of SQL Server Everywhere. Is this information available?
View 6 Replies
View Related
Sep 20, 2007
How can the licensing product key with which SQL Server is installed be replaced/updated?
If this is possible, will the same procedure apply both to SQL Server 2000 and SQL Server 2005?
Thanks.
View 1 Replies
View Related
Jun 7, 2006
hi,
I am realy sorry that I am putting this question here since I don't know where to post this question.
We have purchased
Windows server CAL 2003 English OLP NL user CAL
with 5 user license
We got the Microsoft open license agreement after a month or so.
Now I want to know how to proceed with this license.
Since I am newbie to this kindly guide me in this regard.
thanks
View 1 Replies
View Related
Jul 31, 2006
We are building a system that has mobile clients (laptop with XP and tablet with XP). These clients have data moving back and forth to a centralised n-tier server based system. The communications is proprietory and are very low bandwidth (5 KByte/sec).
We've decided that the best approach to handling both the reference data (ranging from trivial to a complex list of items - about 2 million rows) and the day-to-day operational data is with a database product rather than attempting to handle it ourselves within code.
The question is - what SQL platform to use? SQL Everywhere seems to be a fairly good choice except that it does not seem to support stored procedures. SQL Express is another possibility but there are concerns about the size of the footprint and managing the database engine and the database itself.
The users of the mobile client are considered computer illiterate and would not be able to manage any database administrative tasks. They only come back to base every three to six months. History has shown remote management of the machine has proven difficult (if not impossible) via the low bandwidth connection.
The machines have 512MB of RAM and only 40GB of disk. They have to support XP, Office, our client, and our GIS client. What is the best answer?
Traditionally we would have used MSDE.
Regards
Paul
View 1 Replies
View Related
Aug 14, 2007
Dear Jamie,
Thanks for the reply.
We have another problem to solve.
on the node we are getting product A -2 >=1.978
What does it mean (-2) ?
It is mentioned as two time slices ago. Please help me to undertand this.
From
menik
View 1 Replies
View Related
Jul 20, 2007
When I was setting up my new SQL server I entered the CD-KEY off of the wrong license. I don't want to have to uninstall everything to reinstall it with the new CD-KEY.
Is there a way to change the CD-KEY after installation?
View 3 Replies
View Related
Apr 7, 2007
I have a search box on my website which is used to search the products database.
I will be using the search text in an SQL stored procedure that uses LIKE statements. The search string could realistically contain any character.
How do I prevent SQL injection when any search string is reasonably feasible? .
View 2 Replies
View Related
Sep 6, 2007
I know "select distinct ProductId from Product " selects one product only one time how can i apply the same logic in a query like give bellow SELECT I.QuoteRequestItemId, I.ProductId ,P.StorePartNumber from QuoteRequestItem I left join Product P on I.ProductId = P.ProductId ie product with same productId should be considered only oncethere should not be more than one row with same productId
View 2 Replies
View Related
Mar 12, 2014
Here I have attached excel sheet. I want to do row wise sum, product and then sub total.
View 4 Replies
View Related
May 22, 2008
Hi guys,
Does anybody know a convenient way to return the product of a column, similar to something like the 'sum' function?
If I have a table of form id-date-value, I'd like to do something like:
select id, date, product(val)
If not, does anyone know of a way one could structure this as a subquery?
If all else fails, I suppose I'll have to resort to a loop or cursor, but I'd rather not.
Any help would be much appreciated.
View 11 Replies
View Related
Jul 29, 2013
I have a SQL statement with two left outer joins which connects 3 tables. Vendors, Tracking & Activity. For whatever reason, even though each is a one-to-many relationship, I am able to join 2 tables (from Vendors to Tracking) without an issue. when I then join Activity, I get a Cartesian product.I suspected that 'DISTINCT'.
SELECT DISTINCT CASE
WHEN `vendor`.`companyname` IS NULL then 'No Company Assigned'
ELSE `vendor`.`companyname`
END AS companyNameSQL, `tracking`.`pkgTracking`, CASE
[code]....
View 4 Replies
View Related
Oct 15, 2013
I have a table with product_name and introduction_date(when the product was first introduced)as columns. now i wana calculate average as below
if item is sold in previous business year(suppose 2011-12) then avg should be avg price in businessyear(2010-11), if it is newly introduced(suppose 2013-14)then avg should be of current year(2013-14).
Note:- business year Apr-march
View 1 Replies
View Related
Jan 19, 2014
I want to get a list of any Categories where ALL the products in that Category are not published (Published = 0). (I want to get the Categories where no products are listed for it). Here are the tables, not sure where to begin :
SELECT [Id], Published
FROM Product
WHERE Published = 0
SELECT [Id] ,[Name]
FROM Category
SELECT [Id] ,[ProductId] ,[CategoryId]
FROM Product_Category_Mapping
View 3 Replies
View Related
Feb 27, 2007
Steve writes "Probably not a tough question if I wasn't a newbie:
I have two copies of MSSQL 2005 standard edition, intended for installation on a dual proc db server. The server is physically placed in a remote hosting service.
Since I need to install remotely, it's non-trivial how to get the bits over there. I could fed-ex the CDs to the hosting service and have them feed the machine.
However they suggested that they simply use their MSDN version, which I accepted.
But it turns out the MSDN version setup has a pre-populated product key, and does not allow me to entire my own product key(s).
So the questions:
1) besides the product key thing, is there any difference between the MSDN version and the retail version?
2) does it matter that I enter my product key(s) during installation, or do I need to simply posess the keys to be legit?
3) On a dual-proc system, must two keys entered to activate operation on each processor?
So in general, I'm confused as to the technical dependence of installation on the product keys. After $12k I kinda want to use them."
View 2 Replies
View Related
Sep 17, 2006
i have table:
customer(customerid, age,sex....)
orderdata(orderid, customerid,day)
orderdetails(orderid, productid, quantity)
products(productid, productname,...)
now, i want to show some product for customer when i now him age and sex.
e.ct: if he is a man and age =20 i show product : ball, pull, sport close....... if man is a woman , i show lips, babara, t_shirt, skirt....
if man is a chirdren, i will show joy, story for chidren....
how i create my mining model. and how i query for result in DTS
View 1 Replies
View Related
Sep 15, 2007
http://www.microsoft.com/sql/editions/compact/sscecomparison.mspx
The above link says the pros and cons of two SQL Server 2005 editions.
Document says Compact Edition is not good for €˜When you need a multi-user database server
€™.
What is the meaning of multi-user database?
Does this means the database strictly will not support two database connections at a time?
-Thank you,
Gish
View 1 Replies
View Related