Schema Design For Product Specifications, Please Advise.
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
ADVERTISEMENT
Feb 14, 2007
I have been given a DB that currently stores Organizations. I need to add the ability to track multiple contacts for the Organizations. The DB has several one-to-many relationships on the Organizations table, such as Documents and Notes. I would like to track these by contact as well as the organization.
Is it possible to add a tblcontact and a one-to-many relationships to the Organizations table as well as to the tblDocuments and tblNotes?
I appreciate any suggestions.
tblOrg (OrgID)
tblDocuments (DocID, OrgID)
tblNotes (NoteID, OrgID)
tblContact ???
View 3 Replies
View Related
Jan 4, 2008
Hello,
I have a dimension table that, aside from its surrogate key (which is auto-generated using an identity column), has only one varchar column. I'd like to use an SCD Transform to insert only new output in the dimension, but this won't (?) work because I have no business key (the single varchar column comes from the SSIS pipeline), so my question is: how should I approach this problem? Is the design incorrect (e.g. should I generate the SK in the pipeline and use it as a business key?!), or am I doing something wrong in SSIS?
Thanks
View 5 Replies
View Related
Jul 20, 2005
Hi,I've run into a bit of a sticky design issue. We have products inthree 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 thateach kit gets three products -- one from each category. Obviously,this basic SQL doesn't allow that. Any suggestions? Do I need adifferent schema design, or is there something else I should belooking at?Cheers,CurtisCREATE 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
View Related
Mar 26, 2004
Let me explain what I'm trying to do and see if I can get any suggestions. I have some tables in a database to track "Required Reading" so that users who login must read documents by a certain date.
My first idea was to have a table called Reading that would store each UserID and every DocID from the Documents table. Then when the User logged in I would do a SELECT * FROM Reading WHERE UserID = 'User1' to filter down to all of the documents for the current user. So if I have 10 users and 10 documents then I would have 100 records in the Reading table.
The only problem with that is that every user logged in would have the Reading table open at the same time but no two users should ever be editing the same record. The user would have an exclusive recordset based on his UserID. I just don't know if this would cause a conflict.
Documents
-----------------
DocID nvarchar(16) (PrimaryKey)
Revision nvarchar(8)
RevisionDate smalldatetime
DueDate smalldatetime
Reading
----------------
UserID nvarchar(16) (PrimaryKey)
DocID nvarchar(16) (PrimaryKey)
Read bit
ReadDate smalldatetime
The second idea is to have the same Documents table but when a user logs in, create them a unique table. So if User1 logs in I would check to see if a User1 table exists and if not create it. The same for User2 etc.
User1
------------------
DocID nvarchar(16) (PrimaryKey)
Read bit
ReadDate smalldatetime
User2
------------------
DocID nvarchar(16) (PrimaryKey)
Read bit
ReadDate smalldatetime
Which would be a better schema design?
What would be the best way to index the tables?
View 3 Replies
View Related
Mar 10, 2008
Hi All,
Can you tell me how to represent the problem below?
I want to be able to store different types of information for products in different categories.
So Category A maybe TV's and category B maybe Sofa's and Cateogry C maybe Car. There will however be some common data.
So for a TV I may want to store screen size etc.. and for a Sofa if its leather and for cars maybe whethers its a Saloon, 4x4 etc.. The common data maybe Manufacturer, Price etc..Obviousely each peice of info will be of a different data type.
How best do I represent this in a database because I will have lots of categories of products and the products will be used for filtering too. So I need to create a solution which is not too costly on performance.
To give you an example of what I'm intending on doing..lets look at desktop computers which will have the following product specific info to filter on:
http://computing.kelkoo.co.uk/ctl/do/compareProducts?back=%2Fc-111801-desktop-computers.html&catId=111801&pid1=18445816&pid2=12461415
and for TV's we have
http://audiovisual.kelkoo.co.uk/ctl/do/compareProducts?back=%2Fc-100311823-lcd-tvs.html&catId=100311823&pid1=18052959&pid2=18704336
or
http://shopcompare.eu/ash/search.php?phrase=GPS
and
http://shopcompare.eu/ash/search.php?phrase=palmtops&cid=28
Thanks in advance, any guidance even to any online tutorial would be appreciated.
Gaj-It.com - Gadget News
View 4 Replies
View Related
Aug 15, 2007
I wonder instead of just brainstorming, there probably isa very standard and a simple way to do database schema design.let's say we are doing a website. the user can go overand type in the movie name and zipcode, and the websitewill return all the theaters showing that movie and at whattime, for theaters in THAT zipcode only (for simplicity).so how do we just start and use a standard method thatcan be simple and very accurate to ensure good tables design?
View 12 Replies
View Related
Jul 14, 2005
QUESTIONs:What schema is the best for high speed search for a classified web application?
Is our schema design looks OK? It is a STAR schema and will be used for OLTP type app. Is this OK? or Are we missing something? Please let me know if you need more diagramatic description.
BACKGROUND:Our group is making a classified website (like classified.yahoo.com) where people can place online ad to sell items. like cars, computers, electronics etc. Users will fill out webform for each category(car or computers) with all attributes of the item forsell to post an add.
Main 3 operations the web users will perform: Quick Searching(most frequent): category=car, subcategory=sedan, country=USA city=LosAngeles Zip=empty
Advanced Search(less frequent): User can include all fieldsattributes or then can user a subset to query to do advanced search like :
category=car, subcategory=sedan, country=USA, city=Los Angeles, Year= in(00, 03), transmission=Auto, engine=V6, Maker=Honda, Model=Accord, color=Red and Price < 10000
category=car, subcategory=SUV, country=USA, city=NY, Year= in(99, 00, 03), transmission=Auto, Maker=Toyota, and Price between 11000 and 14500
Insert(least frequent): By filling out web form. For Car, the form will have different dimensionsattributes (year, make, model, transmission, mileage, color, price etc)
Current Schema design: Set of core dimensionlookup tables: stores corecommon attributes for lookups eg. status={open, new, expired}, country={USA, Canada, India,...}
One custom Lookup table: for all custom attribute lookup: transmission{auto, manual}, engine type{V4, V6} for car, processor{PII, PIII, PIV), RAM(512MB, 1GB, 2GB} for Computer & so
3 Fact Tables: Main factPivot table that stores all sell common attributes eg. price, title, year_made, post_date, expire_date, user_name, description etc. One fact table to store custom string, int, float, date field values of ads. One fact table to store custom dropdown field selection values
Concerns and issues: Looking at the schema, it seems to be a STAR schema with multiple fact tables where all core lookup tables connected to the main Pivot table and custom lookup table connected to the 2nd and 3rd fact table.
Quick search only queries the Pivot fact table. While Advanced search query requires to join 3 fact tables. Both query requires to join 3 fact tables with all dimension tables(15 to 20 each having avg of 20 values) to get the look up names so that users sees text instead of ids. Search speed is the Main concerns. Insertionupdate speed doesn't matter that much as that is less frequently done.
View 5 Replies
View Related
Mar 9, 2007
Hello, we have some tables and views that are not assigned to the standard schema of dbo.Whenever I try to use a design time control and/or SQLDataSource connection control, it does not like objects other than those using the dbo. schema.Any ideas on how to resolve this issue?For example, her are a couple of views:dbo.vwCustomersdbo.vwCustomerDetailsord.vwOrdersord.vwOrderDetailsthe views with dbo.* I have no problem with.the views with ord. it tells me the view(s) do not exist.Thanks in advance!
View 1 Replies
View Related
Jul 20, 2005
in simple words it's about versioning at record level.ExampleTableEmployee - EmployeeId, EmployeeName,EmployeeAddress, DepartmentId,TableDesignationMap - EmployeeId, DesignationId, EffectiveDate,validityTableDepartment - DepartmentId, DepartmentTableDesignation - DesignationId, designationVia Modify-Employee-Details screen following are editableEmoyeeNameEmployeeAddressDepartmentDesignationthis screen should allow user to navigate through changes history.Example :Version -1EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation AccountantVersion -2EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment AccountsDesignation Chief Accountant - changedVersion -3EmoyeeName John SmithEmployeeAddress 60 NewYorkDepartment Sales - changedDesignation Marketing Manager - changedQuestion :What is the best proposed database design for maintaining historyrecords bound with version and retrieval techniqueBest RegardsSasanka
View 1 Replies
View Related
Oct 13, 2015
I'm using SQL Server 2008 R2 Management Studio. I have a view that I'd like to index. Obviously, that requires that the view be schema bound to the underlying table. I have found myriad explanations for how to programmatically create a schema bound view, but I've never created a view like that before, and since I'm more a mechanical engineer than a database manager, I'd like to be able to do it the 'easy' way, by just creating the view in Management Studio by going to the database, right clicking on 'Views', clicking on 'New View...' and then, hopefully, checking some box somewhere that schema binds the table to the view.
View 2 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
Mar 10, 2006
I need a powerfull specifications of PC also bears to work as serverfor multiuser(4 users) oracle application .I need vendors of PC and specifications . Would you please help ?
View 2 Replies
View Related
Aug 27, 2007
Hi,
I want to do the backup of SQL server. I want the backup to be consistent. So before starting the backup i want to freeze the DB and once i finish i want to thaw it.I read the Microsoft SQL server virtual backup specifications. It is concerned with taking backup of the DB using snapshot or without using snapshot.I don't want the snapshot to be created. I just want to freeze it and i will take the backup ( with or without snapshot ) . After that i want to thaw it. Is it possible using VDI or is there some other way to do that ?
View 3 Replies
View Related
Aug 30, 2007
Hi all,
I want to write a backup application for SQL server.I have read the VDI specifications for SQL server 2005. I want to know whether I can use the VDI just to freeze and thaw without taking the snaphot and the backup. Or is there any other way to do the same ?
View 1 Replies
View Related
Oct 11, 2006
Hi There,This is related to a ms access database but since I use the SqlDataSource control I thought I should post here.I have a project that I was working on with this ms access db and using sql controls, everything was working just finesince one day I started getting "Object reference not set to an instance of an object" messages when I try to designa query or retrieve a schema, nothing works at design time anymore but at runtime everything is perfect, its a lotof work for me now to create columns,schemas and everything manually, I've tried reinstalling visualstudio, ado componentsbut nothing seems to fix it, did this ever happen to any of you guys?any tip is really appreciated thanks a lot
View 2 Replies
View Related
Nov 16, 2007
I am cutting my teeth on star schema design. I have a simple star schema I am building for Headounct analysis at work. I have a factless fact table where a row represents a head in the company. Each head is toed to a particulat week in a Date dimension tabel. There are additional dimensions for things like gender, ethnicity, marital status, age, etc. Now in my department dimension - it's hierarchical. In the DimDepartmnet there is a department which belongs to a company. Comapnies belong to divisions. Now the fun part. Each division has a headcount target for each year. Up to this point I am in a perfect star schema (no snow flaking). How would I integrate in this concept of a headcount target for each division for a given year?
We are using cognos on top of this star schema to provide reporting and analysis services if that is relevant. From the Star Schema design stand point... any thoughts?
Christian Loris
View 3 Replies
View Related
May 8, 2007
Hi all,
i have "String or binary data would be truncated" error when i try to execute an insert statment.
can i find witch field is affected by this error? (for return it to the user)
thank's all
View 34 Replies
View Related
Jul 15, 2015
I am setting up SQL audit on sql servers in my environment based on requirement. I want to create database specifications ASAP database created. I tried DDL trigger but Audit doesn't support triggers. So I created audit specifications on model database. the only problem with this is every specification created on new database with same name.database specification name includes newly created database name or other methods to create database specifications on newly created databases.
View 6 Replies
View Related
May 27, 2008
Parameter
Access 2000/XP
SQL Server 7.0
SQL Server 2000
MSDE 2000
Number of instances per server
n/a
n/a
16
16
Number of databases per instance / server
n/a
32,767
32,767
32,767
Number of objects per database
32,768
2,147,483,647
2,147,483,647
2,147,483,647
Number of users per database
n/a
16,379
16,379
16,379
Number of roles per database
n/a
16,367
16,367
16,367
Overall size of database (excluding logs)
2 GB
1,048,516 TB
1,048,516 TB
2 GB
Number of columns per table
255
1024
1024
1024
Number of rows per table
limited by storage
limited by storage
limited by storage
limited by storage
Number of bytes per row
(Excluding TEXT/MEMO/IMAGE/OLE)
2 KB
8 KB
8 KB
8 KB
Number of columns per query
255
4,096
4,096
4,096
Number of tables per query
32
256
256
256
Size of procedure / query
64 KB
250 MB
250 MB
250 MB
Number of input params per procedure / query
199
1,024
2,100
2,100
Size of SQL statement / batch
64 KB
64 KB
64 KB
64 KB
Depth of subquery nesting
50
32
32
32
Number of indexes per table
32
250 (1 clustered)
250 (1 clustered)
250 (1 clustered)
Number of columns per index
10
16
16
16
Number of characters per object name
64
128
128
128
Number of concurrent user connections
255
32,767
32,767
5
View 1 Replies
View Related
Sep 27, 2007
Locally I develop in SQL server 2005 enterprise. Recently I recreated my db on the server of my hosting company (in sql server 2005 express).I basically recreated the tables and copied the data in it.I now receive the following error when I hit the DB:The 'System.Web.Security.SqlMembershipProvider' requires a
database schema compatible with schema version '1'. However, the
current database schema is not compatible with this version. You may
need to either install a compatible schema with aspnet_regsql.exe
(available in the framework installation directory), or upgrade the
provider to a newer version.I heard something about running aspnet_regsql.exe, but I dont have that access to the DB. Also I dont know if this command does anything more than creating the membership tables and filling it with some default data...Any other solutions/thought on what this can be?Thanks!
View 4 Replies
View Related
May 27, 2008
I have 35+ tables and 15+ stored procedures with SchemaA, now I want to transfer them to SchemaB.
I know how to do one by one...!
alter schema SchemaB transfer
SchemaA.TableA
but it will take long time...!
Thanks,
View 3 Replies
View Related
Aug 9, 2007
helloI have two related tabletable1cIdcDesctable2IdNamephonecIdThese two tables are relatedwhere cId in table 1 is primary key and cId in table2 is foreign keyIf I want to delete a record in table 1 which is related to table 2Which is faster and more accurateshould I write my stored procedure like thisif exists(select * from table2 where cID = @CID)delete from table1 where cID = @CIDelsereturn 0------------------------------------------or------------------------------------------delete from table1 where cID = @CIDif @@error<>0return 0
View 14 Replies
View Related
Feb 7, 2005
Hi there!!
I just want to ask one question and i am looking for advice or recommendation.
I want to make an application using windows application in .NET. this application is only to have one or two users to enter details of clients on the database using the application and it will be a search for client name or number and other search methods which is similar.
My question now, what database shall i use for this kind of application SQL server or MS Access. i am looking for a new product to use as the cleint can not afford expensive software. Please advise!! thanks!!
View 3 Replies
View Related
Jul 20, 2005
Version: SQL Server 7.0App: MS Access 2000I created DTS to move records from MySQL to SQL Server (approx over 500,000+per months dataset) for purpose of canned and adhoc reporting. The apphave a simple interface using MS Access where user will input the timeframeof the dataset they will process.Both servers are physically located in the same bldg from another state.Previous to MySQL, they send us cd in text format and my app runs the DTSusing a BAT file containing the DTSRUN command. But I would like stay awayfrom the DTSRUN since they take awhile to load to the server, plus it runson background on client pc. I wanted a functionality where it will run onthe server without user supervision, and they can go about their businessand do something else. In other words, let the server do majority of thework.Now that MySQL came into the picture, the Network Support created a filedsnwhere sqlserver sits and I use that as a reference on my DTS (using UNC,\myserverfile$sample.dsn)The problem:1) I work from home and when creating and running this DTS's, it takes awhile to process;2) When specifying the UNC path on DTS and saved, for some reason itswitches to the User/System DSN section;3) I also tested from office with the same result (i connect using cablemodem)Now the only way I can think of to solve this problem:a) save the DTS as a file and send it over to Network Support and have themload it up and manually change the source location OR have them modify theDTS and change the source locationb) then create a DTS jobThe person who will be running this DTS might be running it from home oroffice. Also, is there a way to automate the DTS job using an SP? I wantedto make it as easier as possible for the end user, where all they have to dois enable the job and run only for this time and for this package.TIA!Bob
View 1 Replies
View Related
May 20, 2006
on the 1st opening of my web page it uses the membership control of asp.net
for logging on. sometimes it takes time to logon and worse is, it will
encounter sql server error. that can be resolved by just restarting that
specific page and it will be alright, it will logon normally. this only issue happens only on the first opening of the logon page.
i have read a certain article and it says there that on the first time
you access the sql server, sometimes the sql server needs a little more
time communicating back and forth.
how can i make my log-on page wait a little longer till it communicates
or finishes communicating to the sql server?
im afraid that this may happen once i deploy my web project. i am
expecting over 100 users and they might save to the database all
together. will i encounter problem on this particular?
i am using ASP.NET 2.0 and SQLExpress for this project. pls advise me.
BIG THANKS.
View 11 Replies
View Related
Apr 12, 2008
Hello everybody!I'm using ASP.NET 3.5, MSSQL 2005I bought virtual web hosting .On new user registrations i have an error =(The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version. On my virtual machine it work fine but on web hosting i have an error =(What can you propose to me?
View 2 Replies
View Related
May 8, 2007
Hello,
I would like to use SSIS tool to move the data from one database schema to another database schema.
For example:
Source table has
1. UserName (varchar 20) (no null)
2. Email (varchar 50) (can be null)
Destination table has
1. UserID (uniqueidentifier - GUID)
2. UserName (varchar 50) (no null)
3. EmailAddress (nvarchar 50) (can be null)
4. DateTime
Questions:
1. What controls do I use in my Data Flow to make data move between databases with different data types and include new value in UserID as a new GUID and DateTime as a date (GETDATE)?
OLE DB Source, OLE DB Destination, Data Converson and .....
How do I insert Guid and Date at the same time?
2. I have many tables to do data moving. Any sugestions? How do I architect my project? If I create many data flows for each table - it will look complicated.
Please give me some advices here.
Thanks.
View 3 Replies
View Related
Dec 16, 1999
Hi there,
I would be appreciate to hear some advice regarding my mission to upgrade from SQL Server 6.5 to 7.0. The database would still be located in the same server. Do I have to do checking on the datatypes? - many thanks-
View 4 Replies
View Related
Oct 1, 2004
Hi All
I have been working with Ms access Database the last four years and have gained a lot of experience which help me to have extensive knowledge of Jet, Dao and Ado. Since The Begining of this year i hv been migrating to SQL server server and for that i bought two books :Programming Access project file with Microsoft Sql server and Access Developers Guide to Ms sql server : Chipman & Baron ( this oner is simply a great achievement ). They help me out in the very near past to complety migrate a two database approch Jet Application to a reliable (Adp/ SQL Server client server ) where major parts of the code business logic has been transfered to run on the server as stored procedures and all forms re-built as unbound. these merely leads to a great enhancement of the applications.
My goal now is register to MCDBA and get the certification. I am not interested by classroom training from Microsoft Parterns or online training. I am looking for books that can help to get well prepared for the exams.
Have found this two books in Amazon:
1 - MCAD/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000 Database Design and Implementation, Exam 70-229, Second Edition
2- MCSA/MCSE/MCDBA Self-Paced Training Kit: Microsoft SQL Server 2000 System Administration, 70-228, Second Edition
However their rating didn't encourage me to place directly my orders.
Does someone have any experience with them ?
Do you think they will considerably help me to add value to my knowledge of SQL Server and get ready for the exam ?
Do you know some others books you woul rather encourage me to buy ?
Any advice in this regards really appreciated.
View 2 Replies
View Related
Dec 31, 2007
HiWe usae Sql2000.I'm setting up backups jobs and need advise.When I run a backup of a database, does it automatically clean out thetransaction log ? For a complete backup ? for a differential backup ?When would it be best to run a shrinkdatabase command ? Why would I wantto run the shrinkdatabase ?ThnaksDavid Greenberg
View 3 Replies
View Related
Jan 4, 2007
I am very new in SSIS. I have the Report Server set up with two dozen of the OLAP reports in it. The reports are connected to the OLAP database on a seperate computer running on Sql 2005 server and the data source for the OLAP DB is pointed to the warehouse database on another computer running on Sql 2000 server. The warehouse server updates daily from a number of "Production" Sql servers running on Sql 6.5 and Sql 7.0 with the legacy front-end data entry application. I know the update from the "Production" Sql 6.5/7.0 servers to the warehouse server complete around 9am in the morning everyday. How do I set up a package in SSIS to schedule the update of the OLAP database say 9:30am so that end-user can have the latest data to their report. The OLAP database has one fact table, half a dozen of cubes and ten dimensions. I know it is not an easy task to set up the package in SSIS. Please provide sample and step on how to do this. Thanks. One last question how to prevent/warn users from opening the report when SSIS updating the OLAP database?
View 1 Replies
View Related
May 15, 2008
I am an Application Developer.
I know just this about T-SQL :
Insert, UPDATE, delete aRecord.
JOIN tables.
Create a Hierarchy column.
execute MERGE Statement. [in order to create IDENTICAL tables .]
Create a Master-detail TABLE . [PrimaryKey-Foreig-Key]
WHAT ELSE SHOULD I KNOW widly speaking about T-SQL ??
What are ESSENTIAL things you should know to Be a BIT of an EXPERT ???
Please be STRAIGHT and SIMPLE.
THANKs a LOT.
View 8 Replies
View Related