Search Results

Search found 3163 results on 127 pages for 'schema'.

Page 6/127 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Good tool to visualise database schema?

    - by Mat
    Are there any good tools for visualising a pre-existing database schema? I'm using MySQL if it matters. I'm currently using MySQL Workbench to process an SQL create script dump, but it's clunky, slow and a manual process to drag all the tables about (which would be okay if it wasn't so slow).

    Read the article

  • Schema to support dynamic properties

    - by Johan Fredrik Varen
    Hi people. I'm working on an editor that enables its users to create "object" definitions in real-time. A definition can contain zero or more properties. A property has a name a type. Once a definition is created, a user can create an object of that definition and set the property values of that object. So by the click of a mouse-button, the user should ie. be able to create a new definition called "Bicycle", and add the property "Size" of type "Numeric". Then another property called "Name" of type "Text", and then another property called "Price" of type "Numeric". Once that is done, the user should be able to create a couple of "Bicycle" objects and fill in the "Name" and "Price" property values of each bike. Now, I've seen this feature in several software products, so it must be a well-known concept. My problem started when I sat down and tried to come up with a DB schema to support this data structure, because I want the property values to be stored using the appropriate column types. Ie. a numeric property value is stored as, say, an INT in the database, and a textual property value is stored as VARCHAR. First, I need a table that will hold all my object definitions: Table obj_defs id | name | ---------------- 1 | "Bicycle" | 2 | "Book" | Then I need a table for holding what sort of properties each object definition should have: Table prop_defs id | obj_def_id | name | type | ------------------------------------ 1 | 1 | "Size" | ? | 2 | 1 | "Name" | ? | 3 | 1 | "Price" | ? | 4 | 2 | "Title" | ? | 5 | 2 | "Author" | ? | 6 | 2 | "ISBN" | ? | I would also need a table that holds each object: Table objects id | created | updated | ------------------------------ 1 | 2011-05-14 | 2011-06-15 | 2 | 2011-05-14 | 2011-06-15 | 3 | 2011-05-14 | 2011-06-15 | Finally, I need a table that will hold the actual property values of each object, and one solution is for this table to have one column for each possible value type, such as this: Table prop_vals id | prop_def_id | object_id | numeric | textual | boolean | ------------------------------------------------------------ 1 | 1 | 1 | 27 | | | 2 | 2 | 1 | | "Trek" | | 3 | 3 | 1 | 1249 | | | 4 | 1 | 2 | 26 | | | 5 | 2 | 2 | | "GT" | | 6 | 3 | 2 | 159 | | | 7 | 4 | 3 | | "It" | | 8 | 5 | 3 | | "King" | | 9 | 6 | 4 | 9 | | | If I implemented this schema, what would the "type" column of the prop_defs table hold? Integers that each map to a column name, varchars that simply hold the column name? Any other possibilities? Would a stored procedure help me out here in some way? And what would the SQL for fetching the "name" property of object 2 look like?

    Read the article

  • What is the best schema design for child collection with a "primary" entity

    - by erg39
    Here is the scenario: You have a Persons table with a one-to-many relationship with an Addresses table, where one of the Address rows is the "primary" Address. Is it better in a normalized schema to Use a Persons.PrimaryAddressID to access the "primary" Address for a Person or Use an Addresses.IsPrimary bit column to reference the "primary" Address for a Person via Addresses.PersonID or Other and why?

    Read the article

  • Meshing different systems of keys together in XML Schema

    - by Tom W
    Hello SO, I'd like to ask people's thoughts on an XSD problem I've been pondering. The system I am trying to model is thus: I have a general type that represents some item in a hypothetical model. The type is abstract and will be inherited by all manner of different model objects, so the model is heterogeneous. Furthermore, some types exist only as children of other types. Objects are to be given an identifier, but the scope of uniqueness of this identifier varies. Some objects - we will call them P (for Parent) objects - must have a globally unique identifier. This is straightforward and can use the xs:key schema element. Other objects (we can call them C objects, for Child) are children of a P object and must have an identifier that is unique only in the scope of that parent. For example, object P1 has two children, object C1 and C2, and object P2 has one child, object C3. In this system, the identifiers given could be as follows: P1: 1 (1st P object globally) P2: 2 (2nd P object globally) C1: 1 (1st C object of P1) C2: 2 (2nd C object of P1) C3: 1 (1st C object of P2) I want the identity syntax of every model object to be identical if possible, therefore my first pass at implementing is to define a single type: <xs:complexType name="ModelElement"> <xs:attribute name="IDMode" type="IdentityMode"/> <xs:attribute name="Identifier" type="xs:string"/> </xs:complexType> where the IdentityMode is an enumerated value: <xs:simpleType name="IdentityMode"> <xs:restriction base="xs:string"> <xs:enumeration value="Identified"/> <xs:enumeration value="Indexed"/> <xs:enumeration value="None"/> </xs:restriction> </xs:simpleType> Here "Identified" signifies a global identifier, and "Indexed" indicates an identifier local only to the parent. My question is, how do I enforce these uniqueness conditions using unique, key or other schema elements based on the IdentityMode property of the given subtype of ModelElement?

    Read the article

  • Faking a dynamic schema in Core Data?

    - by Gouldsc
    From reading the Apple Docs on Core Data, I've learned that you should not use Core Data when you need a dynamic schema. If I wanted to provide the user the ability to create their own properties, in a core data model would it work if I created some "dummy" attributes like "custom decimal 1", "custom decimal 2", "custom text 1", "custom text 2" etc that the user could name and use for their own purposes? Obviously this won't work for relationships, but for simple properties it seems like a reasonable workaround. Will creating a bunch of dummy attributes on my entities that go unused by most users noticeably decrease performance for them? Have any of you tried something like this? Thanks!

    Read the article

  • MongoDB Schema Design - Real-time Chat

    - by Nick
    I'm starting a project which I think will be particularly suited to MongoDB due to the speed and scalability it affords. The module I'm currently interested in is to do with real-time chat. If I was to do this in a traditional RDBMS I'd split it out into: Channel (A channel has many users) User (A user has one channel but many messages) Message (A message has a user) The the purpose of this use case, I'd like to assume that there will be typically 5 channels active at one time, each handling at most 5 messages per second. Specific queries that need to be fast: Fetch new messages (based on an bookmark, time stamp maybe, or an incrementing counter?) Post a message to a channel Verify that a user can post in a channel Bearing in mind that the document limit with MongoDB is 4mb, how would you go about designing the schema? What would yours look like? Are there any gotchas I should watch out for?

    Read the article

  • Good conventions for embedding schema of a flat file

    - by Ville Koskinen
    We receive lots of data as flat files: delimitted or just fixed length records. It's sometimes hard to find out what the files actually contain. Are there any well established practices for embedding the schema of the file to the beginning or the end of a file to make the file self-explanatory? Just to get an idea, imagine something like this: <data name=test records=2 type=fixed> <field name=foo start=0 length=2 type=numeric> <field name=bar start=2 length=4 type=text> </data> 11test 12ing We would parse the xml in the beginning and use it for reading the records.

    Read the article

  • xs:choice unbounded list

    - by Matt
    I want to define an XSD schema for an XML document, example below: <?xml version="1.0" encoding="utf-8"?> <view xmlns="http://localhost/model_data" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://localhost/model_data XMLSchemaView.xsd" path="wibble" id="wibble"> <text name="PageTitle">Homepage</text> <text name="Keywords">home foo bar</text> <image name="MainImage"> <description>lolem ipsum</description> <title>i haz it</title> <url>/images/main-image.jpg</url> <type>image/jpeg</type> <alt>alt text for image</alt> <width>400</width> <height>300</height> </image> <link name="TermsAndConditionsLink"> <url>/tnc.html</url> <title>Terms and Conditions</title> <target>_blank</target> </link> </view> There's a view root element and then an unknown number of field elements (of various types). I'm using the following XSD schema: <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://localhost/model_data" targetNamespace="http://localhost/model_data" id="XMLSchema1"> <xs:element name="text" type="text_field"/> <xs:element name="view" type="model_data"/> <xs:complexType name="model_data"> <xs:choice maxOccurs="unbounded"> <xs:element name="text" type="text_field"/> <xs:element name="image" type="image_field"/> <xs:element name="link" type="link_field"/> </xs:choice> <xs:attribute name="path" type="xs:string"/> <xs:attribute name="id" type="xs:string"/> </xs:complexType> <xs:complexType name="image_field"> <xs:all> <xs:element name="description" type="xs:string"/> <xs:element name="title" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="url" type="xs:string"/> <xs:element name="alt" type="xs:string"/> <xs:element name="height" type="xs:int"/> <xs:element name="width" type="xs:int"/> </xs:all> <xs:attribute name="name" type="xs:string"/> </xs:complexType> <xs:complexType name="text_field"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="name" type="xs:string"/> </xs:extension> </xs:simpleContent> </xs:complexType> <xs:complexType name="link_field"> <xs:all> <xs:element name="target" type="xs:string"/> <xs:element name="title" type="xs:string"/> <xs:element name="url" type="xs:string"/> </xs:all> <xs:attribute name="name" type="xs:string"/> </xs:complexType> </xs:schema> This looks like it should work to me, but it doesn't and I always get the following error: Element <text> is not allowed under element <view>. Reason: The following elements are expected at this location (see below) <text> <image> <link> Error location: view / text Details cvc-model-group: Element <text> unexpected by type 'model_data' of element <view>. cvc-elt.5.2.1: The element <view> is not valid with respect to the actual type definition 'model_data'. I've never really used XSD schemas before, so I'd really appreciate it if someone could point out where I'm going wrong.

    Read the article

  • Schema Based Code Completion for NetBeans Platform Applications

    - by Geertjan
    Toni's recent blog entry provides, among several other interesting things, instructions for something I've been wanting to cover for a long time, which is schema based code completion: The above is a sample I created via Toni's tutorial, using the schema described here: http://www.w3schools.com/schema/schema_example.asp The support for the Navigator ain't bad either, especially considering I didn't do any coding at all to get all this: And here's where you can find the whole sample: http://java.net/projects/nb-api-samples/sources/api-samples/show/versions/7.2/misc/ShipOrder

    Read the article

  • Couldn't run loadjava on user schema to load dbwsclientws.jar dbwsclientdb102.jar

    - by padmaja
    I am trying to load oracle webservice client jars to my schema. I did set the PATH to inlcude: /u01/app/oracle/product/10.2.0/db_1/bin When I try to run loadjava as "loadjava -u myschema/myscehmapwd -r -v -f -genmissing dbwsclientws.jar dbwsclientdb102.jar" I am getting error: Exception in thread "main" java.lang.NoClassDefFoundError: oracle/aurora/server/tools/loadjava/LoadJavaMain. Does it mean that jvm is not setup on the box? How can I check if the jvm is enabled or not? I am running it on Oracle 10g in UNIX environment. Any help with the issue is greatly appreciated.

    Read the article

  • Design ideas for a versioned db schema with related tables also versioned

    - by vfilby
    Here is the drill, I want to version a database. I have done this before using multiple rows where the table primary key becomes a combination of the row id and either a datestamp or a version #. Now I want to version a table that depends on many other small tables. Versioning each table will be a giant PITA, so I am looking for good options to verion a schema where the data to be versioned spreads over multiple tables. All related tables are properly keyed with foreign key relationships. The database is currently on Sql Server 2005.

    Read the article

  • Inheritance in XML Schema definition (XSD) for Java objects

    - by bguiz
    Hi, I need to create an XML schema definition (XSD) that describes Java objects. I was wondering how to do this when the objects in question inherit from a common base class with a type parameter. public abstract class Rule<T> { ... } public abstract class TimeRule extends Rule<XTime> { ... } public abstract class LocationRule extends Rule<Location> { ... } public abstract class IntRule extends Rule<Integer> { ... } .... (where XTime and Location are custom classes define elsewhere) How would I go about constructing an XSD that such that I can have XML nodes that represent each of the subclasses of Rule<T> - without the XSD for each of them repeating their common contents? Thank you!

    Read the article

  • Schema.org for Product Reviews

    - by Lynda
    I have a product reviews on a site and I am adding schema.org markup to the reviews. Here is the code I am using: <div class="blockquote-wrap"> <blockquote itemprop="review" itemscope itemtype="http://schema.org/Review"><span itemprop="reviewBody">Text of the review itself.</span> <cite><span itemprop="author">Author Name</span>, Location of Author</cite> </blockquote> </div> This is all the reviews are. When I test the page using Google's Structured Data Testing Tool I receive this error: Error: Incomplete microdata with schema.org. My question is what data is missing that is required? I don't see which data is required on the Schema.org page for reviews.

    Read the article

  • Validating call to web service against schema before sending request

    - by Cen
    I am calling a web service (written in Java) in my web app. I use the WSDL to generate proxy classes using the wsdl.exe command line tool. Everything is working fine. However, I have found out that the web service is not doing any data validation at all when they receive a request from my app. Hence, if I happen to send one minute piece of data that isn't exactly what they want, I receive a general fault error in return, with no specifics at all of what the incorrect (if any) piece of data is. So, before I make the request, I'd like to validate my request against the schema they have provided. Is this possible, and if so, how do I go about this? Thanks in advance

    Read the article

  • How to create a valid schema in a WSDL that restrict to <|<=|>|>=

    - by wsxedc
    This is what I have in my schema section of my WSDL to specify the field has to be comparison operators <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="&lt;|&gt;|&lt;=|&gt;=|="/> </xsd:restriction> </xsd:simpleType> SoapUI complains about this part of the WSDL, I tried to set the value to something with non special characters and the WSDL is valid. So I tried to replace that whole long string to be value=">gt;" and it valid but value="<lt;" is not valid, and value=">" is also not valid. My question is, why does the WSDL validation need > to be double escaped? The main question is, how to provide a valid less than side within the pattern value.

    Read the article

  • Core Data No Longer Updating Sqlite Schema

    - by nefsu
    I am using core data for my app and I never had any problems adding or removing columns until recently. But now even if I make changes to my xcdatamodel and generate new and updated entity h/m files, sqlite doesn't seem to be picking up the changes. I actually went over to the documents folder and inspected the create statement for the relevant tables in sqlite3 and I was able to confirm that the columns I added were missing. I removed and redeployed the app several times to no avail. Is it possible to do something to the app to make it disregard any schema changes being made through xcdatamodel? I guess another thing I should mention is I recently started putting my entire projects folder in CVS so I wonder if something got messed up in the checkin and check out process.

    Read the article

  • XML Schema that describes a self-describing XML document

    - by Raegx
    Is it possible to write an XML Schema that describes an XML document that lists a set of elements and then requires other elements on that same XML document to use those values as either attributes and/or sub-elements? Example: define a list of locations, then force location attributes and/or location elements to be of those values. <root> <locations> <location>Home</location> <location>Office</location> <location>School</location> </locations> <addresses> <address location="Home">...</address> <address location="Office">...</address> </addresses> </root> or <root> <locations> <location>Home</location> <location>Office</location> <location>School</location> </locations> <addresses> <address> <location>Home</location> ... </address> <address> <location>Office</location> ... </address> </addresses> </root> I am failing hard at finding the proper way to search for this information. I suspect it is either not possible or I just don't know the right search terms.

    Read the article

  • Is it possible to alternate between two types in an XML Schema

    - by lief79
    I'm wondering if I am missing something obvious. I have a list of numbers, possibly including ranges (think of the print page option of a print dialog). Ideally I'd like to have the final XML output look like this, with page and pageRange in an order. <pages> <page> 1</page> <pageRange><start>3</start><end>6</end></pageRange> <page> 34</page> </pages> What would I have to put into a schema to allow this? From what I saw: Sequence with multiple page and page Range allowed doesn't permit alternation. Choice only allows one or the other. I tried messing with all, but I wasn't getting it to validate properly. My short term solution is to have a sequence of ranges, and to force single numbers into the range, but it seems potentially cumbersome. So am I missing something?

    Read the article

  • database schema eligible for delta synchronization

    - by WilliamLou
    it's a question for discussion only. Right now, I need to re-design a mysql database table. Basically, this table contains all the contract records I synchronized from another database. The contract record can be modified, deleted or users can add new contract records via GUI interface. At this stage, the table structure is exactly the same as the Contract info (column: serial number, expiry date etc.). In that case, I can only synchronize the whole table (delete all old records, replace with new ones). If I want to delta(only synchronize with modified, new, deleted records) synchronize the table, how should I change the database schema? here is the method I come up with, but I need your suggestions because I think it's a common scenario in database applications. 1)introduce a sequence number concept/column: for each sequence, mark the new added records, modified records, deleted records with this sequence number. By recording the last synchronized sequence number, only pass those records with higher sequence number; 2) because deleted contracts can be added back, and the original table has primary key constraints, should I create another table for those deleted records? or add a flag column to indicate if this contract has been deleted? I hope I explain my question clearly. Anyway, if you know any articles or your own suggestions about this, please let me know. Thanks!

    Read the article

  • xml schema putting both sequence and all under one complexType node

    - by exiang
    Here is the xml file: <section> <number>1</number> <title>A Title goes here...</title> <code>TheCode</code> <element></element> <element></element> </section> In section node, there are number, title and code node. Their sequence must not be fixed. Then, there are multiple element under section node as well. The idea is to use the following schema: <xs:complexType name="Type-section"> <xs:all> <xs:element name="number" minOccurs="0"></xs:element> <xs:element name="code" minOccurs="1"></xs:element> <xs:element name="title" minOccurs="1"></xs:element> </xs:all> <xs:sequence> <xs:element maxOccurs="unbounded" name="element"></xs:element> </xs:sequence> </xs:complexType> But it is invalid. I just cant put "sequence" and "all" together in the same level. How can i fix it?

    Read the article

  • Schema for storing "binary" values, such as Male/Female, in a database

    - by latentflip
    Intro I am trying to decide how best to set up my database schema for a (Rails) model. I have a model related to money which indicates whether the value is an income (positive cash value) or an expense (negative cash value). I would like separate column(s) to indicate whether it is an income or an expense, rather than relying on whether the value stored is positive or negative. Question: How would you store these values, and why? Have a single column, say Income, and store 1 if it's an income, 0 if it's an expense, null if not known. Have two columns, Income and Expense, setting their values to 1 or 0 as appropriate. Something else? I figure the question is similar to storing a person's gender in a database (ignoring aliens/transgender/etc) hence my title. My thoughts so far Lookup might be easier with a single column, but there is a risk of mistaking 0 (false, expense) for null (unknown). Having seperate columns might be more difficult to maintain (what happens if we end up with a 1 in both columns? Maybe it's not that big a deal which way I go, but it would be great to have any concerns/thoughts raised before I get too far down the line and have to change my code-base because I missed something that should have been obvious! Thanks, Philip

    Read the article

  • SQL Design Question regarding schema and if Name value pair is the best solution

    - by Aur
    I am having a small problem trying to decide on database schema for a current project. I am by no means a DBA. The application parses through a file based on user input and enters that data in the database. The number of fields that can be parsed is between 1 and 42 at the current moment. The current design of the database is entirely flat with there being 42 columns; some have repeated columns such as address1, address2, address3, etc... This says that I should normalize the data. However, data integrity is not needed at this moment and the way the data is shaped I'm looking at several joins. Not a bad thing but the data is still in a 1 to 1 relationship and I still see a lot of empty fields per row. So my concerns are that this does not allow the database or the application to be very extendable. If they want to add more fields to be parsed (which they do) than I'd need to create another table and add another foreign key to the linking table. The third option is I have a table where the fields are defined and a table for each record. So what I was thinking is to make a table that stores the value and then links to those two tables. The problem is I can picture the size of that table growing large depending on the input size. If someone gives me a file with 300,000 records than 300,000 x 40 = 12 million so I have some reservations. However I think if I get to that point than I should be happy it is being used. This option also allows for more custom displaying of information albeit a bit more work but little rework even if you add more fields. So the problem boils down to: 1. Current design is a flat file which makes extending it hard and it is not normalized. 2. Normalize the tables although no real benefits for the moment but requirements change. 3. Normalize it down into the name value pair and hope size doesn't hurt. There are a large number of inserts, updates, and selects against that table. So performance is a worry but I believe the saying is design now, performance testing later? I'm probably just missing something practical so any comments would be appreciated even if it’s a quick sanity check. Thank you for your time.

    Read the article

  • Reporting tool for OLAP, *not* OLTP!

    - by Stefan Moser
    I'm looking for a control that I can put on top of an already existing OLAP star schema to allow the user to define their own "queries" and generate reports. Right now I have some predefined reports built on top of the cubes, but I'd like to allow the user to define their own criteria based on the cubes that I've created. I've found lots of products that will allow you to treat a transactional table like an OLAP cube, but nothing specifically for pre-existing cubes. EDIT: Let me be clear, I know there are countless reporting tools out there that claim to report on OLAP cubes. The problem is they all assume they are looking at transactional data and try to create their own cubes. I have tables that contain tens, if not hundreds of millions of records. Most tools crash when handling this much data, the others just run incredible slowly. I don't want a tool that is targeting the business people. I want a tool that understands what a star and snowflake schema is. I want to be able to tell it what the fact tables are and what the dimension tables are, and then creates a UI on top of them. This is an easier problem to solve for the tool vendor because I am spoon feeding them the cubes. I want to rely on the fact that cubes are a standardized pattern and I want a tool that takes advantage of this fact. I want a tool that targets developers and starts with the assumption that I actually know how to manage my data, it just needs to build pretty reports for me and not crumble under the weight of my data.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >