Search:

Type: Posts; User: Celko; Keyword(s):

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. Normalization is good

    In the future, would you please post DDL along with sample data? It would also help if you read a book on basic data modeling so you know there's no such thing as generic ID or generic name; they...
  2. Replies
    1
    Views
    189

    Your approach is wrong.

    Pretty much everything you're trying to do is wrong. Not a little wrong, but fundamentally, conceptually wrong.

    Tables are sets; that means they have to be collective or plural. You've told us you...
  3. Replies
    2
    Views
    473

    SQL is intended to be a high level language, not...

    SQL is intended to be a high level language, not assembly language. While you can do it. It's not a good idea and it will give code that will never port to a different piece of hardware (are you a...
  4. Replies
    2
    Views
    696

    First of all, we need to get the terminology...

    First of all, we need to get the terminology right. The terms "child" and "parent" are not part of RDBMS; they are part of the old network databases. In SQL. We have "referenced" and "referencing...
  5. The quick answer is, "yes, with dynamic SQL." But...

    The quick answer is, "yes, with dynamic SQL." But the right answer is not program this way. This is what is sometimes referred to as "automobiles, squids and Lady Gaga coding'; it means we have no...
  6. Read Dr. Codd

    Actually you did not post a table at all! By definition, a table has to have a key, and we have no DDL. Your "new column id" is wrong on a couple of points. Putting spaces in a data element name...
  7. Replies
    2
    Views
    410

    Two ways to do it ..

    You need to get in the habit of posting DDL. This is basic netiquette for the last 30 years on SQL forums. Next you need to read a book on basic data modeling, so you will know about ISO 11179 naming...
  8. Replies
    4
    Views
    502

    Your mindset is wrong.

    Your whole approach to this is wrong. First of all, a field in SQL is part of a temporal value (year, month, day, hour, minute, second); you probably meant to say column. The term field also refers...
  9. Thread: Database Design

    by Celko
    Replies
    11
    Views
    951

    First, a little pedantic aside and request for more info ..

    Your design does not look right; you need to get a good book on basic data modeling. There is no such thing as a "type_ID" in RDBMS. That would violate the law of identity from formal logic. But we...
  10. Replies
    8
    Views
    924

    Why not use GIS tools?

    [quote] It is during this process that I populate an ID field [sic] in the new table that is an integer, is auto number and acts as a primary key.
    [\quote]

    There are some problems here. There...
  11. Replies
    5
    Views
    1,070

    wrong approach

    The Julian business day is a good trick. Number the days from whenever your calendar starts and repeat a number for a long weekend or company holiday.

    CREATE TABLE Calendar
    (cal_date DATE NOT...
  12. A better question ..

    A better question is how can I get rid of the trigger and use declarative constraints maintain data integrity.

    I am also kinda curious about a trigger that works on all database events.If you are...
  13. Replies
    2
    Views
    485

    We really need to see some DDL here. What you did...

    We really need to see some DDL here. What you did post has very fundamental errors in it. For example, columns change names. This does not happen in a valid data model. Sometimes you have a...
  14. Try this approach

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You did quite...
  15. Replies
    8
    Views
    54,571

    Is this what you meant?

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements.

    We need to...
  16. Replies
    1
    Views
    451

    Follow the rules, please.

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element...
  17. Replies
    2
    Views
    484

    even I would not try to do a direct translation.

    This is harder than you think. The extended equality sign notation actually came in 2 forms; Sybase and Oracle (Centura – nee Gupta - let you configure their product to work either way.

    Consider...
  18. Replies
    3
    Views
    608

    too vague to be used; try again

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should...
  19. Your CIO will call me ..

    Yes, please do pass my name and credentials long to him or her. .

    I have been at this for decades, not years. I have personally watched EIGHT companies fail because they did not want to correct...
  20. Replies
    5
    Views
    568

    How much set theory do you remember?

    >> I'm trying to wrap my head around self joins and try to write a query to match my use case. however, I'm only halfway through and need some pointers in the right direction. <<

    The terms “child”...
  21. Normalization

    Do you know what First Normal Form (1NF) means? One of the violations is the use of repeated groups. A fake array, like you have done. A table has to have a key, but your posting cannot ever have a...
  22. Replies
    1
    Views
    454

    Where can we find the rules? Most of us have no...

    Where can we find the rules? Most of us have no idea what they are! How is your Texas 42?
  23. Thread: A little help

    by Celko
    Replies
    4
    Views
    677

    Yes, but if the job looks "problematic" I carry...

    Yes, but if the job looks "problematic" I carry $1 million in liability insurance and talk to Gail, my personal attorney who used bye a DBA :)
  24. Thread: A little help

    by Celko
    Replies
    4
    Views
    677

    Talk to a lawyer before you got to jail

    the short answer in to encrypt the database. But talk to the lawyer or accountants involved. :)

    Each industry has different requirements and we live in a world where ROI now means "Risk of...
  25. Replies
    5
    Views
    757

    Better design means easier queries

    >> I have 3 tables <<

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data...
Results 1 to 25 of 58
Page 1 of 3 1 2 3