Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322

    Unanswered: Homework question

    How do I create a database, and what's the best color to choose?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    I think mauve has the most RAM.

  3. #3
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by MCrowley
    I think mauve has the most RAM.

    Thanks, I think that's what I read

    So what's with all this join stuff?

    Do I need more than 1 table?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Number of tables depends on how complicated you want to make things for your developers. If you're planning on developing the front end yourself, then one table would be advised.

    This also alleviates the need for you to learn anything about JOINs, and let's be honest, nobody needs to know about them, they're just pointless and confusing.

    Lump it all in one table and you remove the complexity!

    Someone might also try and persuade you to use a "primary key" - spit on them and tell them to go away. Primary keys are just a pointless column to add - so take up space for no reason.
    George
    Home | Blog

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Oh and if you think mauve is good, you should see the new burgundy models!
    George
    Home | Blog

  6. #6
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by georgev
    Oh and if you think mauve is good, you should see the new burgundy models!

    Well how often do they have new releases?

    I would hate to be behind in the latest color

    Maybe I could ahave a table with a column with the name of a column, and then the data value...should I even need a coulumn for the table name?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  7. #7
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    database shmatabase. just persist all of your data in text files. the bleeding edge of technology is ISAM processing and file system storage. I think they call it XML.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Cool, I'll do that.

    How do you spell XML?

    And why is it that GetDate() still leaves you at home on a Saturday night?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    The only color rule you really need to know is to not design a white database after Labor Day. Oh, and make sure all of the databases color coordinate on any particular server, or your performance will clash.

    Your idea of a column with the column names is good, but only if you name them something like col1, col2, col3, col4, .... You really should name them Value1, Value2, Value3, .... because after all, you are storing Values in the columns, and not columns.

  10. #10
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    This is all the DDL you will ever need:
    Code:
    CREATE TABLE [DatabaseTable]
    	([PrimaryKey] [int] NOT NULL CONSTRAINT [DF_DatabaseTable_PrimaryKey] DEFAULT (1) PRIMARY KEY CLUSTERED,
    	[AllTheData] [xml] NULL)
    GO
    ALTER TABLE [dbo].[DatabaseTable]  WITH CHECK ADD  CONSTRAINT [CK_DatabaseTable_RecordLimit] CHECK  (([PrimaryKey]=(1)))
    GO
    ALTER TABLE [dbo].[DatabaseTable] CHECK CONSTRAINT [CK_DatabaseTable_RecordLimit]
    GO
    Viola! Instant Universal Database Application!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  11. #11
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Excel!!!!!!!
    George
    Home | Blog

  12. #12
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    the solution to all database problems...

    DROP DATABASE <EnterDatabaseName>

    or xp_cmdshell 'FORMAT C:'

    xp_cmdshell 'FORMAT D:'

    xp_cmdshell 'FORMAT E:' etc... until you run out of letters
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  13. #13
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by Thrasymachus
    the solution to all database problems...

    DROP DATABASE <EnterDatabaseName>

    or xp_cmdshell 'FORMAT C:'

    xp_cmdshell 'FORMAT D:'

    xp_cmdshell 'FORMAT E:' etc... until you run out of letters

    I see, you could have a letters table I gues, then use a cursor, and WHILE @@FETCH_STATUS = 0, you could go until everything is just hunkey-dorey

    I guess you could also just go up to the roof and bounce the server too
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  14. #14
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Couldn't resist
    Code:
    DECLARE @Start int
    DECLARE @End   int
    DECLARE @SQL   varchar(8000) --that should cover it!
    
    SET @Start = ASCII('C')
    SET @End   = ASCII ('Z') + 1
    
    WHILE @Start < @End BEGIN --C to Z
    	SET @SQL = ''
    	SET @SQL = 'xp_cmdshell ''FORMAT ' + CHAR(@Start) + ''''
    	--EXEC
    	SET @Start = @Start + 1
    END
    George
    Home | Blog

  15. #15
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by Brett Kaiser
    Do I need more than 1 table?
    Yes, you need 42

Posting Permissions

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